Re: [闲聊] 每日leetcode

楼主: smart0eddie (smart0eddie)   2024-07-22 09:16:49
2024-07-22
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.

我不知道这题是要考sorting算法 还是要考indexed sorting应用
反正解答打开来好像很多人都是直接套sort
那就
对啊

Links booklink

Contact Us: admin [ a t ] ucptt.com