(people)
return queue
:type people: List[List[int]]
    :rtype: List[List[int]]
:type people: List[List[int]]
    :rtype: List[List[int]]
: type people : List [ List [ int ]] : rtype : List [ List [ int ]]
def reconstruct_queue(people):
    """
    :type people: List[List[int]]
    :rtype: List[List[int]]
    """
    queue = []
    people.sort(key=lambda x: (-x[0], x[1]))
    for h, k in people:
        queue.insert(k, (h, k))
    return queue
def reconstruct_queue ( people ) : queue = [ ] people . sort ( key = lambda x : ( - x [ 0 ] , x [ 1 ] ) ) for h , k in people : queue . insert ( k , ( h , k ) ) return queue