Pergunta de entrevista da empresa American Express

Locate the middle node in a single-linked list with one pass through the data.

Resposta da entrevista

Sigiloso

27 de jan. de 2015

have 2 references x,y; advance x by 1, but y by 2 nodes. when y hits the end of list x is the middle.

2