2418. Sort the People

Updated: 2024-03-12
1 min read
[]

On This Page

LeetCode problem 2418

class Solution:
    def sortPeople(self, names: List[str], heights: List[int]) -> List[str]:
        return [name for _, name in sorted(zip(heights, names), reverse=True)]