Pregunta de entrevista de American Express

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

Respuesta de la entrevista

Anónimo

27 ene 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