# Queue Reconstruction by Height

```python
class Solution:
    """
    @param people: a random list of people
    @return: the queue that be reconstructed
    """
    def reconstructQueue(self, people):
        # write your code here
        people.sort(key= lambda x: (-x[0],x[1]))
        res = []
        for p in people:
            res.insert(p[1],p)
        return res

```

在python里sort comparator可以很容易用lambda表示出来。

类似于如果node是三维的如下

```python
array.sort(key=lambda x: (x[0],x[1],x[2]))
```
