Pergunta de entrevista da empresa Aleph (NY)

Ad-hoc HackerRank problem, no weird algorithms required. Language of your choice.