- Source : https://leetcode.com/explore/learn/card/fun-with-arrays/511/in-place-operations/3157/
- Author : Han
- Date : 2022-01-03
Problems
Given an integer array nums, move all 0’s to the end of it while maintaining the relative order of the non-zero elements.
Note that you must do this in-place without making a copy of the array.
Example 1
1 | |
Example 2
1 | |
###Solution
1 | |