Nagarro interview question

Write code for sorting an array?