Pergunta de entrevista da empresa IFDS Group

Desribe an algorithm in any programming languague.