Find nth last number in a singly linked list.
Anonymous
Have two pointers with a difference of n. When pointer1 is at head, pointer2 is at element n from the head. Traverse the list moving pointer1 and pointer2 until pointer2 reaches end of the list at which case pointer1 is pointing to element at N from end.
Check out your Company Bowl for anonymous work chats.