Pergunta de entrevista da empresa Two Sigma

Shortest distance in a doubly linked list.