Day 18 || DELETE NODE IN LINKED LIST || leetCode 237 || linked list || DSA live with me

There is a singly-linked list head and we want to delete a node node in it. You are given the node to be deleted node. You will not be given access to the first node of head. All the values of the linked list are unique, and it is guaranteed that the given node node is not the last node in the linked list. Delete the given node. Note that by deleting the node, we do not mean removing it from memory. We mean: The value of the given node should not exist in the linked list. The number of nodes in the linked list should decrease by one. All the values before node should be in the same order. All the values after node should be in the same order. Custom testing: For the input, you should provide the entire linked list head and the node to be given node. node should not be the last node of the list and should be an actual node in the list. We will build the linked list and pass the node to your function. The output will be the entire list after calling your function. 00:00 setup 01:52 - Introduction to LeetCode 237. You mention that while the solution is simple, understanding the question is the hardest part. 03:54 - Linked List vs. Array: A deep dive into memory management. You use your fingers to explain continuous memory (Arrays) and the "hostel/PG" analogy for linked lists (nodes connected by addresses). 07:22 - Explaining the "Last Node/Null" concept and how nodes point to each other. 08:20 - The core constraint: You are given the node to be deleted, but no access to the head. You explain why this makes the problem tricky. 2. Logic & Strategy (13:10 - 20:00) 14:25 - The "Aha!" Moment: You explain that since we can't change the previous node's pointer, we must copy the next node's value into the current node and then skip the next node. 15:13 - Visual dry run: Transforming [4, 5, 1, 9] into [4, 1, 9] by overwriting the 5. 18:22 - A quick break to handle a "kitchen emergency" (tea/kadha alert!)—classic live stream moment. 3. Coding & Submission (20:03 - 24:14) 20:03 - Starting the Java implementation. 20:56 - Writing the first line: node.val = node.next.val; (copying the value). 21:40 - Writing the second line: node.next = node.next.next; (re-linking the pointers). 24:05 - Code submission and success!