comefrom: <doocs>1968.Array With Elements Not Equal to Average of Neighbors_1.py
code: def rearrangeArray( nums: List[int]) -> List[int]:
      nums.sort()
      n = len(nums)
      m = (n + 1) >> 1
      ans = []
      for i in range(m):
          ans.append(nums[i])
          if i + m < n:
              ans.append(nums[i + m])
      return ans
masked: def sample_funcname ( var_0 : List [ int ] ) -> List [ int ] :
      var_0.sort ( )
      var_1 = len ( var_0 )
      var_2 = ( var_1 + 1 ) >> 1
      var_3 = [ ]
      for var_4 in range ( var_2 ) :
          var_3.append ( var_0 [ var_4 ] )
          if var_4 + var_2 < var_1 :
              var_3.append ( var_0 [ var_4 + var_2 ] )
      return var_3
  