Pregunta de entrevista de Microsoft

Searching algorithm for the second nearest word