## 贪心算法

| \# | 题名 | 题解 | 通过率 | 难度 | 出现频率   |
|------|----------------------|-----|--------|----|--------|
|135|[分发糖果](https://leetcode-cn.com/problems/candy)   |[40](https://leetcode-cn.com/problems/candy/solution)|40.6%|困难|63.19%|
|763|[划分字母区间](https://leetcode-cn.com/problems/partition-labels)   |[30](https://leetcode-cn.com/problems/partition-labels/solution)|68.9%|中等|45.55%|
|45|[跳跃游戏 II](https://leetcode-cn.com/problems/jump-game-ii)   |[92](https://leetcode-cn.com/problems/jump-game-ii/solution)|32.4%|困难|44.83%|
|870|[优势洗牌](https://leetcode-cn.com/problems/advantage-shuffle)   |[16](https://leetcode-cn.com/problems/advantage-shuffle/solution)|33.8%|中等|41%|
|1111|[有效括号的嵌套深度](https://leetcode-cn.com/problems/maximum-nesting-depth-of-two-valid-parentheses-strings)   |[18](https://leetcode-cn.com/problems/maximum-nesting-depth-of-two-valid-parentheses-strings/solution)|65.9%|中等|38.29%|
|714|[买卖股票的最佳时机含手续费](https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee)   |[18](https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/solution)|58.9%|中等|38.22%|
|452|[用最少数量的箭引爆气球](https://leetcode-cn.com/problems/minimum-number-of-arrows-to-burst-balloons)   |[16](https://leetcode-cn.com/problems/minimum-number-of-arrows-to-burst-balloons/solution)|47.3%|中等|33.97%|
|44|[通配符匹配](https://leetcode-cn.com/problems/wildcard-matching)   |[50](https://leetcode-cn.com/problems/wildcard-matching/solution)|25.6%|困难|33.58%|
|321|[拼接最大数](https://leetcode-cn.com/problems/create-maximum-number)   |[9](https://leetcode-cn.com/problems/create-maximum-number/solution)|26.0%|困难|32.57%|
|1231|[分享巧克力](https://leetcode-cn.com/problems/divide-chocolate)   |[7](https://leetcode-cn.com/problems/divide-chocolate/solution)|54.8%|困难|31.73%|
|55|[跳跃游戏](https://leetcode-cn.com/problems/jump-game)   |[159](https://leetcode-cn.com/problems/jump-game/solution)|37.2%|中等|29.91%|
|435|[无重叠区间](https://leetcode-cn.com/problems/non-overlapping-intervals)   |[15](https://leetcode-cn.com/problems/non-overlapping-intervals/solution)|43.5%|中等|29.23%|
|402|[移掉K位数字](https://leetcode-cn.com/problems/remove-k-digits)   |[34](https://leetcode-cn.com/problems/remove-k-digits/solution)|27.1%|中等|29.12%|
|984|[不含 AAA 或 BBB 的字符串](https://leetcode-cn.com/problems/string-without-aaa-or-bbb)   |[16](https://leetcode-cn.com/problems/string-without-aaa-or-bbb/solution)|34.4%|中等|28.79%|
|910|[最小差值 II](https://leetcode-cn.com/problems/smallest-range-ii)   |[7](https://leetcode-cn.com/problems/smallest-range-ii/solution)|24.8%|中等|27.23%|
|502|[IPO](https://leetcode-cn.com/problems/ipo)   |[14](https://leetcode-cn.com/problems/ipo/solution)|35.6%|困难|25.21%|
|738|[单调递增的数字](https://leetcode-cn.com/problems/monotone-increasing-digits)   |[22](https://leetcode-cn.com/problems/monotone-increasing-digits/solution)|40.3%|中等|24.92%|
|455|[分发饼干](https://leetcode-cn.com/problems/assign-cookies)   |[61](https://leetcode-cn.com/problems/assign-cookies/solution)|52.4%|简单|24.83%|
|1029|[两地调度](https://leetcode-cn.com/problems/two-city-scheduling)   |[31](https://leetcode-cn.com/problems/two-city-scheduling/solution)|56.7%|简单|23.92%|
|406|[根据身高重建队列](https://leetcode-cn.com/problems/queue-reconstruction-by-height)   |[31](https://leetcode-cn.com/problems/queue-reconstruction-by-height/solution)|60.6%|中等|23.07%|
|881|[救生艇](https://leetcode-cn.com/problems/boats-to-save-people)   |[8](https://leetcode-cn.com/problems/boats-to-save-people/solution)|38.6%|中等|22.11%|
|253|[会议室 II](https://leetcode-cn.com/problems/meeting-rooms-ii)   |[27](https://leetcode-cn.com/problems/meeting-rooms-ii/solution)|38.9%|中等|21.75%|
|1247|[交换字符使得字符串相同](https://leetcode-cn.com/problems/minimum-swaps-to-make-strings-equal)   |[34](https://leetcode-cn.com/problems/minimum-swaps-to-make-strings-equal/solution)|51.6%|中等|21.48%|
|927|[三等分](https://leetcode-cn.com/problems/three-equal-parts)   |[8](https://leetcode-cn.com/problems/three-equal-parts/solution)|28.8%|困难|21.36%|
|874|[模拟行走机器人](https://leetcode-cn.com/problems/walking-robot-simulation)   |[21](https://leetcode-cn.com/problems/walking-robot-simulation/solution)|31.2%|简单|21.02%|
|392|[判断子序列](https://leetcode-cn.com/problems/is-subsequence)   |[83](https://leetcode-cn.com/problems/is-subsequence/solution)|47.5%|简单|20.2%|
|122|[买卖股票的最佳时机 II](https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-ii)   |[170](https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-ii/solution)|56.6%|简单|19.36%|
|316|[去除重复字母](https://leetcode-cn.com/problems/remove-duplicate-letters)   |[36](https://leetcode-cn.com/problems/remove-duplicate-letters/solution)|35.9%|困难|19.26%|
|955|[删列造序 II](https://leetcode-cn.com/problems/delete-columns-to-make-sorted-ii)   |[8](https://leetcode-cn.com/problems/delete-columns-to-make-sorted-ii/solution)|27.2%|中等|18.64%|
|134|[加油站](https://leetcode-cn.com/problems/gas-station)   |[51](https://leetcode-cn.com/problems/gas-station/solution)|50.2%|中等|17.39%|
|765|[情侣牵手](https://leetcode-cn.com/problems/couples-holding-hands)   |[28](https://leetcode-cn.com/problems/couples-holding-hands/solution)|55.2%|困难|17.24%|
|1057|[校园自行车分配](https://leetcode-cn.com/problems/campus-bikes)   |[4](https://leetcode-cn.com/problems/campus-bikes/solution)|30.8%|中等|16.86%|
|651|[4键键盘](https://leetcode-cn.com/problems/4-keys-keyboard)   |[10](https://leetcode-cn.com/problems/4-keys-keyboard/solution)|56.4%|中等|16.86%|
|1046|[最后一块石头的重量](https://leetcode-cn.com/problems/last-stone-weight)   |[91](https://leetcode-cn.com/problems/last-stone-weight/solution)|58.6%|简单|16.59%|
|1053|[交换一次的先前排列](https://leetcode-cn.com/problems/previous-permutation-with-one-swap)   |[22](https://leetcode-cn.com/problems/previous-permutation-with-one-swap/solution)|41.3%|中等|15.58%|
|621|[任务调度器](https://leetcode-cn.com/problems/task-scheduler)   |[33](https://leetcode-cn.com/problems/task-scheduler/solution)|46.1%|中等|15.16%|
|1007|[行相等的最少多米诺旋转](https://leetcode-cn.com/problems/minimum-domino-rotations-for-equal-row)   |[5](https://leetcode-cn.com/problems/minimum-domino-rotations-for-equal-row/solution)|42.1%|中等|14.56%|
|376|[摆动序列](https://leetcode-cn.com/problems/wiggle-subsequence)   |[31](https://leetcode-cn.com/problems/wiggle-subsequence/solution)|40.3%|中等|13.73%|
|767|[重构字符串](https://leetcode-cn.com/problems/reorganize-string)   |[17](https://leetcode-cn.com/problems/reorganize-string/solution)|38.0%|中等|12.62%|
|842|[将数组拆分成斐波那契序列](https://leetcode-cn.com/problems/split-array-into-fibonacci-sequence)   |[20](https://leetcode-cn.com/problems/split-array-into-fibonacci-sequence/solution)|35.3%|中等|10.89%|
|861|[翻转矩阵后的得分](https://leetcode-cn.com/problems/score-after-flipping-matrix)   |[16](https://leetcode-cn.com/problems/score-after-flipping-matrix/solution)|73.1%|中等|10.06%|
|860|[柠檬水找零](https://leetcode-cn.com/problems/lemonade-change)   |[44](https://leetcode-cn.com/problems/lemonade-change/solution)|53.2%|简单|9.81%|
|944|[删列造序](https://leetcode-cn.com/problems/delete-columns-to-make-sorted)   |[25](https://leetcode-cn.com/problems/delete-columns-to-make-sorted/solution)|67.9%|简单|9.62%|
|1217|[玩筹码](https://leetcode-cn.com/problems/play-with-chips)   |[49](https://leetcode-cn.com/problems/play-with-chips/solution)|66.1%|简单|9.61%|
|1094|[拼车](https://leetcode-cn.com/problems/car-pooling)   |[35](https://leetcode-cn.com/problems/car-pooling/solution)|50.1%|中等|9.31%|
|1221|[分割平衡字符串](https://leetcode-cn.com/problems/split-a-string-in-balanced-strings)   |[121](https://leetcode-cn.com/problems/split-a-string-in-balanced-strings/solution)|76.2%|简单|4.49%|
|1296|[划分数组为连续数字的集合](https://leetcode-cn.com/problems/divide-array-in-sets-of-k-consecutive-numbers)   |[31](https://leetcode-cn.com/problems/divide-array-in-sets-of-k-consecutive-numbers/solution)|39.5%|中等|2.39%|
|1282|[用户分组](https://leetcode-cn.com/problems/group-the-people-given-the-group-size-they-belong-to)   |[38](https://leetcode-cn.com/problems/group-the-people-given-the-group-size-they-belong-to/solution)|78.2%|中等|1.52%|
|1276|[不浪费原料的汉堡制作方案](https://leetcode-cn.com/problems/number-of-burgers-with-no-waste-of-ingredients)   |[24](https://leetcode-cn.com/problems/number-of-burgers-with-no-waste-of-ingredients/solution)|48.5%|中等|&nbsp;|
|1253|[重构 2 行二进制矩阵](https://leetcode-cn.com/problems/reconstruct-a-2-row-binary-matrix)   |[25](https://leetcode-cn.com/problems/reconstruct-a-2-row-binary-matrix/solution)|34.2%|中等|&nbsp;|
|1090|[受标签影响的最大值](https://leetcode-cn.com/problems/largest-values-from-labels)   |[8](https://leetcode-cn.com/problems/largest-values-from-labels/solution)|46.2%|中等|&nbsp;|
|1196|[最多可以买到的苹果数量](https://leetcode-cn.com/problems/how-many-apples-can-you-put-into-the-basket)   |[10](https://leetcode-cn.com/problems/how-many-apples-can-you-put-into-the-basket/solution)|67.6%|简单|&nbsp;|
|1167|[连接棒材的最低费用](https://leetcode-cn.com/problems/minimum-cost-to-connect-sticks)   |[6](https://leetcode-cn.com/problems/minimum-cost-to-connect-sticks/solution)|30.1%|中等|&nbsp;|
|1058|[最小化舍入误差以满足目标](https://leetcode-cn.com/problems/minimize-rounding-error-to-meet-target)   |[6](https://leetcode-cn.com/problems/minimize-rounding-error-to-meet-target/solution)|26.6%|中等|&nbsp;|
|1055|[形成字符串的最短路径](https://leetcode-cn.com/problems/shortest-way-to-form-string)   |[7](https://leetcode-cn.com/problems/shortest-way-to-form-string/solution)|47.9%|中等|&nbsp;|
|1005|[K 次取反后最大化的数组和](https://leetcode-cn.com/problems/maximize-sum-of-array-after-k-negations)   |[33](https://leetcode-cn.com/problems/maximize-sum-of-array-after-k-negations/solution)|50.0%|简单|&nbsp;|
|995|[K 连续位的最小翻转次数](https://leetcode-cn.com/problems/minimum-number-of-k-consecutive-bit-flips)   |[9](https://leetcode-cn.com/problems/minimum-number-of-k-consecutive-bit-flips/solution)|37.9%|困难|&nbsp;|
|991|[坏了的计算器](https://leetcode-cn.com/problems/broken-calculator)   |[10](https://leetcode-cn.com/problems/broken-calculator/solution)|50.2%|中等|&nbsp;|
|948|[令牌放置](https://leetcode-cn.com/problems/bag-of-tokens)   |[14](https://leetcode-cn.com/problems/bag-of-tokens/solution)|35.4%|中等|&nbsp;|
|936|[戳印序列](https://leetcode-cn.com/problems/stamping-the-sequence)   |[2](https://leetcode-cn.com/problems/stamping-the-sequence/solution)|29.0%|困难|&nbsp;|
|921|[使括号有效的最少添加](https://leetcode-cn.com/problems/minimum-add-to-make-parentheses-valid)   |[28](https://leetcode-cn.com/problems/minimum-add-to-make-parentheses-valid/solution)|69.0%|中等|&nbsp;|
|759|[员工空闲时间](https://leetcode-cn.com/problems/employee-free-time)   |[8](https://leetcode-cn.com/problems/employee-free-time/solution)|54.4%|困难|&nbsp;|
|757|[ 设置交集大小至少为2](https://leetcode-cn.com/problems/set-intersection-size-at-least-two)   |[7](https://leetcode-cn.com/problems/set-intersection-size-at-least-two/solution)|33.3%|困难|&nbsp;|
|659|[分割数组为连续子序列](https://leetcode-cn.com/problems/split-array-into-consecutive-subsequences)   |[9](https://leetcode-cn.com/problems/split-array-into-consecutive-subsequences/solution)|40.1%|中等|&nbsp;|
|649|[Dota2 参议院](https://leetcode-cn.com/problems/dota2-senate)   |[17](https://leetcode-cn.com/problems/dota2-senate/solution)|36.3%|中等|&nbsp;|
|630|[课程表 III](https://leetcode-cn.com/problems/course-schedule-iii)   |[4](https://leetcode-cn.com/problems/course-schedule-iii/solution)|29.1%|困难|&nbsp;|
|484|[寻找排列](https://leetcode-cn.com/problems/find-permutation)   |[6](https://leetcode-cn.com/problems/find-permutation/solution)|66.3%|中等|&nbsp;|
|358|[K 距离间隔重排字符串](https://leetcode-cn.com/problems/rearrange-string-k-distance-apart)   |[6](https://leetcode-cn.com/problems/rearrange-string-k-distance-apart/solution)|35.1%|困难|&nbsp;|
|330|[按要求补齐数组](https://leetcode-cn.com/problems/patching-array)   |[8](https://leetcode-cn.com/problems/patching-array/solution)|40.4%|困难|&nbsp;|
