Pergunta de entrevista da empresa Own Company

sorting, searching and logic puzzle