Delete Node in Linked List
LeetCode Problem #237 (Easy)
Problem Statement
Testcases
Example 1:
Input: head = [4,5,1,9], node = 5
Output: [4,1,9]
Explanation:
You are given the second node with value 5.
The linked list should become 4 -> 1 -> 9
Example 2:
Input: head = [4,5,1,9], node = 1
Output: [4,5,9]
Explanation:
You are given the third node with value 1.
The linked list should become 4 -> 5 -> 9.Prerequisite Knowledge
General Approach

Algorithm
Swap Nodes Approach



Code
Last updated