Prolifics Interview Question

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