Pergunta de entrevista da empresa Camerinfolks

which algorithm would you choose for this task?