comefrom: <doocs>0376.Wiggle Subsequence_1.py
code: def wiggleMaxLength( nums: List[int]) -> int:
      up = down = 1
      for i in range(1, len(nums)):
          if nums[i] > nums[i - 1]:
              up = max(up, down + 1)
          elif nums[i] < nums[i - 1]:
              down = max(down, up + 1)
      return max(up, down)
masked: def sample_funcname ( var_0 : List [ int ] ) -> int :
      var_2 = var_1 = 1
      for var_3 in range ( 1 , len ( var_0 ) ) :
          if var_0 [ var_3 ] > var_0 [ var_3 - 1 ] :
              var_2 = max ( var_2 , var_1 + 1 )
          elif var_0 [ var_3 ] < var_0 [ var_3 - 1 ] :
              var_1 = max ( var_1 , var_2 + 1 )
      return max ( var_2 , var_1 )
  