Thursday, April 14, 2011

To find nth element from the end in a linked list

Use two pointers.
Start the second pointer when the first pointer reaches nth element.

No comments: