diff --git a/week4/sort-the-people.py b/week4/sort-the-people.py new file mode 100644 index 0000000..2f16ac0 --- /dev/null +++ b/week4/sort-the-people.py @@ -0,0 +1,7 @@ +class Solution: + def sortPeople(self, names: List[str], heights: List[int]) -> List[str]: + return [n for n, h in sorted(zip(names, heights), key=lambda x: x[1], reverse=True)] + + #one liner + + \ No newline at end of file