comefrom: <doocs>0739.Daily Temperatures_1.py
code: def dailyTemperatures( temperatures: List[int]) -> List[int]:
      ans = [0] * len(temperatures)
      stk = []
      for i, t in enumerate(temperatures):
          while stk and temperatures[stk[-1]] < t:
              j = stk.pop()
              ans[j] = i - j
          stk.append(i)
      return ans
masked: def sample_funcname ( var_0 : List [ int ] ) -> List [ int ] :
      var_1 = [ 0 ] * len ( var_0 )
      var_2 = [ ]
      for var_3 , var_4 in enumerate ( var_0 ) :
          while var_2 and var_0 [ var_2 [ - 1 ] ] < var_4 :
              var_5 = var_2.pop ( )
              var_1 [ var_5 ] = var_3 - var_5
          var_2.append ( var_3 )
      return var_1
  