You are given an array of strings names, and an array heights consisting of distinct positive integers, where both arrays have a length of n.
For each index i, names[i] and heights[i] represent the name and height of the
Return names sorted in descending order based on the people’s heights.
Constraints:
n names.length heights.length
n
names[i].length
heights[i]
names[i] consists of lowercase and uppercase English letters.
All the values of heights are distinct.
You are given an array of strings names, and an array heights consisting of distinct positive integers, where both arrays have a length of n.
For each index i, names[i] and heights[i] represent the name and height of the
Return names sorted in descending order based on the people’s heights.
Constraints:
n names.length heights.length
n
names[i].length
heights[i]
names[i] consists of lowercase and uppercase English letters.
All the values of heights are distinct.