LeetCode 2418. Sort the People | Interview Preparation | English | code io

Опубликовано: 11 Март 2026
на канале: code io - English
1,875
52

2418. Sort the People

You are given an array of strings names, and an array heights that consists of distinct positive integers. Both arrays are of length n.

For each index i, names[i] and heights[i] denote the name and height of the ith person.

Return names sorted in descending order by the people's heights.

Follow us on:
Instagram: https://www.instagram.com/code.i.o/?h...

Keywords
Leetcode Solution
Interview Preparations
Google
Facebook
Meta
Google Interview
Facebook Interview