Update 506 solution

This commit is contained in:
halfrost
2021-12-12 21:21:21 +08:00
parent a8c69e5520
commit 75074a73d0
10 changed files with 103 additions and 10 deletions

View File

@ -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 就可以知道它排的名次了
## 代码