読者です 読者をやめる 読者になる 読者になる

Delete a Node in the middle of singly Linked List

Cracking The Coding Interview LinkedList

Problem

Implement an algorithm to delete a Node in the middle of singly Linked List, given only access to that Node

example: in following linked list case

①→②→③→④→⑤

I'm given only node③ and I have to delete node③.

Source Code