Day 17 – Advanced Linked Lists + Trapping Rainwater
Leetcode 237. Delete Node in a Linked List
Intuition: You’re given access to the node itself, not the head. Copy data from next node, then delete the next node.
void deleteNode(ListNode* node) {
node->val = node->next->val;
node->next = node-...
sids-dsa-journal.hashnode.dev6 min read