Genpact interview question

Basic coding concepts like sorting logic.