Actually inspired by the description of the problem itself XDDD.

""*For example, [1,7,4,9,2,5] is a wiggle sequence because the differences (6,-3,5,-7,3) are alternately positive and negative.*""

Greedy solution, use deque so we have O(1) popleft.

```
class Solution(object):
def wiggleMaxLength(self, nums):
from collections import deque
if len(nums) <= 1: return len(nums)
diff = deque([nums[i] - nums[i-1] for i in xrange(1, len(nums))])
total = 1
current = diff.popleft()
while diff:
val = diff.popleft()
if val * current < 0 :
total += 1
current = val
return total +1
```