Pergunta de entrevista da empresa Amazon

To find nth node from the end in a singly linked list

Resposta da entrevista

Sigiloso

28 de dez. de 2010

Have two pointers called headPointer, NthPointer. Move headPointer N times. Move both the pointer until headPointer hits null. NthPointer will point to Nth Node.

1