Pregunta de entrevista de IFDS Group

Desribe an algorithm in any programming languague.