<doocs>1968.Array With Elements Not Equal to Average of Neighbors_1.py
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
def sample_funcname ( var_0 : List [ int ] ) -> List [ int ] :
    var_0.sort ( )
    var_5 = len ( var_0 )
    var_7 = ( var_5 + 1 ) >> 1
    var_8 = [ ]
    for var_10 in range ( var_7 ) :
        var_8.append ( var_0 [ var_10 ] )
        if var_10 + var_7 < var_5 :
            var_8.append ( var_0 [ var_10 + var_7 ] )
    return var_8
