CompThoughts - Algorithm Problems
Implement an algorithm to delete a node in the middle (i.e., any node but the first and last node, not necessarily the exact middle) of a singly linked list, given only access to that node (you are not given access to the head of the linked list). Example:
Input: the node c from the linked list a -> b -> c -> d -> e
Result: nothing is returned, but the new linked list looks like: a -> b -> d -> e-> f
Read full article from CompThoughts - Algorithm Problems
No comments:
Post a Comment