Pregunta de entrevista de Samsung Electronics

Solve a difficult coding challenge