Prolifics interview question

write a code for sorting an array? explain with a example