Repository navigation
1.10 计数排序 #29
utterances-bot
started this conversation in
Comments
Replies: 6 comments 2 replies
|
更加通俗易懂的理解:https://baijiahao.baidu.com/s?id=1613842852280800384&wfr=spider&for=pc |
0 replies
这篇文章不错~~ 后期会考虑重新改写一下排序相关的文章,变得更加易懂一些。 |
0 replies
|
"逆序遍历数组 arr"的意义是什么?正向遍历数组arr也可以。 |
1 reply
主要是为了稳定排序。逆序遍历方便确定同值元素在排序之前的前后顺序。 |
0 replies
|
大佬,有一处笔误:
|
1 reply
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
1.10 计数排序
计数排序 # 1. 计数排序算法思想 # 计数排序(Counting Sort)基本思想:
使用一个额外的数组 counts,其中第 i 个元素 counts[i] 是待排序数组 arr 中值等于 i 的元素个数。然后根据数组 counts 来将 arr 中的元素排到正确的位置。
2. 计数排
https://algo.itcharge.cn/01_array/01_10_array_counting_sort/
All reactions