Skip to content

Commit

Permalink
Update 0406.根据身高重建队列.md
Browse files Browse the repository at this point in the history
Use ref
  • Loading branch information
Martin-Hsu authored Dec 17, 2021
1 parent d89b396 commit 595ab6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions problems/0406.根据身高重建队列.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ C++代码如下:
// 版本一
class Solution {
public:
static bool cmp(const vector<int> a, const vector<int> b) {
static bool cmp(const vector<int>& a, const vector<int>& b) {
if (a[0] == b[0]) return a[1] < b[1];
return a[0] > b[0];
}
Expand Down Expand Up @@ -130,7 +130,7 @@ public:
class Solution {
public:
// 身高从大到小排(身高相同k小的站前面)
static bool cmp(const vector<int> a, const vector<int> b) {
static bool cmp(const vector<int>& a, const vector<int>& b) {
if (a[0] == b[0]) return a[1] < b[1];
return a[0] > b[0];
}
Expand Down

0 comments on commit 595ab6e

Please sign in to comment.