Skip to content

Commit dd58193

Browse files
committed
Merge branch 'main' of github.com:tkzzzzzz6/Algorithm_beginner_learning_notes
2 parents 393d9a9 + 9cccefa commit dd58193

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

acwing/problems/3213.数字排序.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<!--
2+
* @Author: tkzzzzzz6
3+
* @Date: 2026-05-18 11:10:00
4+
* @LastEditors: tkzzzzzz6
5+
* @LastEditTime: 2026-05-21 11:01:20
6+
-->
17
# 2. 数字排序
28

39
## 题目描述
@@ -9,7 +15,6 @@
915
1. 使用一个数组 `cnt` 来统计每个整数出现的次数,数组的索引表示整数的值,数组的值表示该整数出现的次数。
1016
2. 定义一个结构体 `Data` 来存储整数的值和出现次数,并重载 `<` 运算符以便按照出现次数从大到小排序,如果出现次数相同,则按照整数的大小从小到大排序。
1117
3. 将统计结果存储在一个数组 `q` 中,并对该数组进行排序。
12-
4. 最后输出排序后的结果。
1318

1419
```cpp
1520
#include <iostream>

0 commit comments

Comments
 (0)