LeetCode 283. 移动零

https://leetcode-cn.com/problems/move-zeroes/

 双指针,快慢指针

 

class Solution {
public:

    void moveZeroes(vector& nums) {
        int p=0;
        int q=0;
        int n=nums.size();

        while(q

 

你可能感兴趣的:(LeetCode)