Pergunta de entrevista da empresa Samsung Electronics

Solve a difficult coding challenge