<p>Given an integer array <code>nums</code>, move all <code>0</code>&#39;s to the end of it while maintaining the relative order of the non-zero elements.</p>

<p><strong>Note</strong> that you must do this in-place without making a copy of the array.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<pre><strong>Input:</strong> nums = [0,1,0,3,12]
<strong>Output:</strong> [1,3,12,0,0]
</pre><p><strong class="example">Example 2:</strong></p>
<pre><strong>Input:</strong> nums = [0]
<strong>Output:</strong> [0]
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= nums.length &lt;= 10<sup>4</sup></code></li>
	<li><code>-2<sup>31</sup> &lt;= nums[i] &lt;= 2<sup>31</sup> - 1</code></li>
</ul>

<p>&nbsp;</p>
<strong>Follow up:</strong> Could you minimize the total number of operations done?
class Solution:
    def moveZeroes(self, nums: List[int]) -> None:
        l = 0
        r = 0

        if r+1 <= len(nums) - 1:
            while nums[r+1] == 0:
                r += 1
                if r >= len(nums) - 1:
                    break
        
        if l+1 <= len(nums) - 1:
            while nums[l] != 0:
                l += 1
                r = max(r, l)
                if l >= len(nums) - 1:
                    break

        print(l, r)
        if l > r:
            return

        while (r < len(nums) - 1):
            if nums[r+1] != 0:
                nums[l] = nums[r+1]
                nums[r+1] = 0

                l += 1
                r += 1
    
            print(l, r)
            
            if r+1 <= len(nums) - 1:
                while nums[r+1] == 0:
                    r += 1
                    if r >= len(nums) - 1:
                        break
            if l+1 <= len(nums) - 1:
                while nums[l] != 0:
                    l += 1
                    r = max(l, r)
                    if l >= len(nums) -1:
                        break

            
        
17900