mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-07 09:54:57 +08:00
Update 506 solution
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
# [506. Relative Ranks](https://leetcode-cn.com/problems/relative-ranks/)
|
||||
# [506. Relative Ranks](https://leetcode.com/problems/relative-ranks/)
|
||||
|
||||
## 题目
|
||||
|
||||
@ -47,7 +47,7 @@ Return an array answer of size n where answer[i] is the rank of the ith athlete.
|
||||
|
||||
## 解题思路
|
||||
|
||||
- 用map记录原来score中元素对应的坐标,然后对score进行排序,对排序后的元素我们通过map就可以知道它排的名次了
|
||||
- 用 map 记录原来 score 中元素对应的坐标,然后对 score 进行排序,对排序后的元素我们通过 map 就可以知道它排的名次了
|
||||
|
||||
## 代码
|
||||
|
||||
|
Reference in New Issue
Block a user