Pregunta de entrevista de EGYM

An data structure coding problem to solve in Google docs.