comefrom: <doocs>1099.Two Sum Less Than K_1.py
code: def twoSumLessThanK( nums: List[int], k: int) -> int:
      nums.sort()
      low, high = 0, len(nums) - 1
      res = -1
      while low < high:
          val = nums[low] + nums[high]
          if val < k:
              res = max(res, val)
              low += 1
          else:
              high -= 1
      return res
masked: def sample_funcname ( var_0 : List [ int ] , var_3 : int ) -> int :
      var_0.sort ( )
      var_6 , var_9 = 0 , len ( var_0 ) - 1
      var_10 = - 1
      while var_6 < var_9 :
          var_11 = var_0 [ var_6 ] + var_0 [ var_9 ]
          if var_11 < var_3 :
              var_10 = max ( var_10 , var_11 )
              var_6 += 1
          else :
              var_9 -= 1
      return var_10
  