Wiggle Subsequence
Find the length of the longest subsequence whose differences alternate between rising and falling. The visual marks each step as up or down and extends the alternating run.
Find the length of the longest subsequence whose differences alternate between rising and falling. The visual marks each step as up or down and extends the alternating run.