Cognizant interview question

sort the elements of a array using pointer