LeetCode #237 — Delete Node in a Linked List
2 min readJun 2, 2020
Find more useful articles at www.davidseek.com
LeetCode’s challenge of June 2, 2020 (#237) asks us to delete a Node from a LinkedList. The tricky part is that we only have access to the Node itself, not to the head or parent Node.
Given the Node 5
, as part of the LinkedList (4->5->1->9)
, we're expected to return (4->1->9)
with the Node 5 cut out of the list.