We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 699a5ad commit cdc3318Copy full SHA for cdc3318
leetcode/406.根据身高重建队列.py
@@ -1,8 +1,8 @@
1
-# 先按升高降序排序,身高相同则按k升序排序。再以k为索引插入排序
+# 先按身高降序排序,身高相同则按k升序排序。再以k为索引插入排序
2
class Solution(object):
3
def reconstructQueue(self, people):
4
people.sort(key=lambda x:(-x[0], x[1]))
5
res = []
6
for p in people:
7
res.insert(p[1], p)
8
- return res
+ return res
0 commit comments