https://leetcode-cn.com/problems/remove-duplicates-from-sorted-array-ii/
var removeDuplicates = function(nums) {
let k = 0
for(let x of nums)
if (k <2 || (nums[k - 1] != x || nums[k - 2] != x)) nums[k ++] = x
return k
};
https://leetcode-cn.com/problems/remove-duplicates-from-sorted-array-ii/
var removeDuplicates = function(nums) {
let k = 0
for(let x of nums)
if (k <2 || (nums[k - 1] != x || nums[k - 2] != x)) nums[k ++] = x
return k
};