He gave an array and asked you to reverse it.
Implement reverse_array(nums) to reverse the list in place and return the same list object after reversal. The input is a list of integers, and the output is the reversed list.
Function signature: reverse_array(nums)
def reverse_array(nums):