class Solution {
public:
int wiggleMaxLength(vector<int>& nums) {
int len=nums.size();
if(len<2) return len;
int slen=1, blen=1;
for (int i=1; i<len; i++) {
if(nums[i]>nums[i1])
blen=slen+1;
else if(nums[i]<nums[i1])
slen=blen+1;
}
return max(slen,blen);
}
};
first share...

@yanxinseu Please try to use ``` backquotes (right below the ESC button) to format your code properly, thank you. This is really hard to read.