Pregunta de entrevista de GTS

Single coding question with 4 hours to complete