Pregunta de entrevista de Ford Motor Company

Typical Hacker Rank data structure and algorithm