Pexlify interview question

Sort an array and explain/give time complexity.