Integrate interview question

Sort an array without using sort function with best time and space complexity