Pergunta de entrevista da empresa Ksolves

Puzzle logic questions based on sorting?