LeetCode – Wiggle Subsequence (Java)
Given a sequence of integers, return the length of the longest subsequence that is a wiggle sequence. A subsequence is obtained by deleting some number of elements (eventually, also zero) from the original sequence, leaving the remaining elements in their original order. Java Solution The problem is converted to finding the turning point. When nums[i] … Read more