![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
计数排序
文章平均质量分 87
memcpy0
希望探索文理结合的自由之路。
展开
-
LeetCode 1921. Eliminate Maximum Number of Monsters【贪心,计数排序】1527
本文属于「征服LeetCode」系列文章之一,这一系列正式开始于2021/08/12。由于LeetCode上部分题目有锁,本系列将至少持续到刷完所有无锁题之日为止;由于LeetCode还在不断地创建新题,本系列的终止日期可能是永远。在这一系列刷题文章中,我不仅会讲解多种解题思路及其优化,还会用多种编程语言实现题解,涉及到通用解法时更将归纳总结出相应的算法模板。。原创 2023-09-03 23:09:54 · 307 阅读 · 0 评论 -
LeetCode 1637. Widest Vertical Area Between Two Points Containing No Points【数组,排序,桶排】中等
本文属于「征服LeetCode」系列文章之一,这一系列正式开始于2021/08/12。由于LeetCode上部分题目有锁,本系列将至少持续到刷完所有无锁题之日为止;由于LeetCode还在不断地创建新题,本系列的终止日期可能是永远。在这一系列刷题文章中,我不仅会讲解多种解题思路及其优化,还会用多种编程语言实现题解,涉及到通用解法时更将归纳总结出相应的算法模板。为了方便在PC上运行调试、分享代码文件,我还建立了相关的。原创 2023-04-01 02:14:59 · 104 阅读 · 0 评论 -
LeetCode 274. H-Index【排序,计数排序+前缀和】中等
Given an array of integers citations where citations[i] is the number of citations a researcher received for their ith paper, return compute the researcher's h-index.According to the definition of h-index on Wikipedia: A scientist has an index h if h of t原创 2021-07-12 23:29:54 · 187 阅读 · 0 评论