2026年物业门控五金耗材推荐榜:中企创联工业品,小区/写字楼/物业多场景门控配件全覆盖
2026/3/1 13:31:04
283. Move Zeroes (Easy)
Leetcode / 力扣
For example, given nums = [0, 1, 0, 3, 12], after calling your function, nums should be [1, 3, 12, 0, 0].public void moveZeroes(int[] nums) { int idx = 0; for (int num : nums) { if (num != 0) { nums[idx++] = num; } } while (idx < nums.length) { nums[idx++] = 0; } }566. Reshape the Matrix (Easy)