Write a function to sort an array.
Implement the function below to return the elements in ascending order. Do not use Python's built-in sort() or sorted() functions. The input is a list of integers, and the function should return the same list object after sorting it in place.
Function signature: def sort_array(nums):
def sort_array(nums):