Back to Questions

Delete Node in a Linked List (O(1) trick)

37.2K viewsAsked at Google
Easy

Question Explain

Given only a reference to the node that is to be deleted in a singly linked list (not the head), delete the node. This is an $O(1)$ constant time operation.

Start Trying This Question Simulation

Practice answering orally or with text to get instant AI feedback.

Practice with This Question