How would you solve the Move Zeroes problem using the common LeetCode pattern?
Implement move_zeroes(nums) to move every 0 to the end of nums in place, preserving the relative order of nonzero values. Return the modified list for evaluation. Use an approach that runs in linear time and constant extra space.
Example: nums = [0, 1, 0, 3, 12] produces [1, 3, 12, 0, 0].
Constraints: 1 <= len(nums) <= 5000; values are integers.
def move_zeroes(nums):