网址:https://leetcode.com/problems/remove-element/
双指针(广义)
class Solution { public: int removeElement(vector<int>& nums, int val) { int count = 0; int siz = nums.size(); for (int i = 0; i < siz; i++) { if (nums[i] != val) { nums[count++] = nums[i]; } } return count; } };