Domanda di colloquio di John Deere

Basic questions regarding some sorting techniques and few puzzles.