Pergunta de entrevista da empresa N-SIDE

Common computer science algorithmic question