Shift all zeros in the array to right of the array without using another array in O(n) complexity.
Implement move_zeros(nums) for a list of integers. Modify the list in place, preserve the relative order of all nonzero values, and return the modified list. The solution must use O(n) time and O(1) extra space.
def move_zeros(nums):