Domanda di colloquio di RBC

A simple coding question having to do with sorting arrays