特牛网址导航

[LeetCode C++] 283. 移动零_力扣 283. 移动零 c++_超级大洋葱806的博客-CSDN博客

网友收藏
来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/move-zeroes解法:双指针class Solution {public: void moveZeroes(vector<int>& nums) { int n=nums.size(), left=0, right=0; while(right < n){ if(nums[right]){ _力扣 283. 移动零 c++