# 困难难度题目合集

困难难度题目从类型上说多是：

- 图
- 设计题
- 游戏场景题目
- 中等题目的 follow up

从解法上来说，多是：

- 图算法
- 动态规划
- 二分法
- DFS & BFS
- 状态压缩
- 剪枝

从逻辑上说， 要么就是非常难想到，要么就是非常难写代码。 这里我总结了几个技巧：

1. 看题目的数据范围， 看能否暴力模拟
2. 暴力枚举所有可能的算法往上套，比如图的题目。
3. 总结和记忆解题模板，减少解题压力

以下是我列举的经典题目（带 91 字样的表示出自 **91 天学算法**活动）：

- [0004. 寻找两个正序数组的中位数](../problems/4.median-of-two-sorted-arrays.md)
- [0023. 合并 K 个升序链表](../problems/23.merge-k-sorted-lists.md)
- [0025. K 个一组翻转链表](../problems/25.reverse-nodes-in-k-groups.md)
- [0030. 串联所有单词的子串](../problems/30.substring-with-concatenation-of-all-words.md)
- [0032. 最长有效括号](../problems/32.longest-valid-parentheses.md)
- [0042. 接雨水](../problems/42.trapping-rain-water.md)
- [0052. N 皇后 II](../problems/52.N-Queens-II.md)
- [0057. 插入区间](problems/57.insert-interval.md)
- [0084. 柱状图中最大的矩形](../problems/84.largest-rectangle-in-histogram.md)
- [0085. 最大矩形](../problems/85.maximal-rectangle.md)
- [0124. 二叉树中的最大路径和](../problems/124.binary-tree-maximum-path-sum.md)
- [0128. 最长连续序列](../problems/128.longest-consecutive-sequence.md)
- [0140. 单词拆分 II](problems/140.word-break-ii.md)
- [0145. 二叉树的后序遍历](../problems/145.binary-tree-postorder-traversal.md)
- [0212. 单词搜索 II](../problems/212.word-search-ii.md)
- [0239. 滑动窗口最大值](../problems/239.sliding-window-maximum.md)
- [0295. 数据流的中位数](../problems/295.find-median-from-data-stream.md)
- [0297. 二叉树的序列化与反序列化](../problems/297.serialize-and-deserialize-binary-tree.md) 91
- [0301. 删除无效的括号](../problems/301.remove-invalid-parentheses.md)
- [0312. 戳气球](../problems/312.burst-balloons.md)
- [330. 按要求补齐数组](../problems/330.patching-array.md)
- [0335. 路径交叉](../problems/335.self-crossing.md)
- [0460. LFU 缓存](../problems/460.lfu-cache.md)
- [0472. 连接词](../problems/472.concatenated-words.md)
- [0488. 祖玛游戏](../problems/488.zuma-game.md)
- [0493. 翻转对](../problems/493.reverse-pairs.md)
- [0715. Range 模块](../problems/715.range-module.md)
- [0768. 最多能完成排序的块 II](../problems/768.max-chunks-to-make-sorted-ii.md) 91
- [0887. 鸡蛋掉落](../problems/887.super-egg-drop.md)
- [0895. 最大频率栈](../problems/895.maximum-frequency-stack.md)
- [0975. 奇偶跳](../problems/975.odd-even-jump.md)
- [1032. 字符流](../problems/1032.stream-of-characters.md)
- [1168. 水资源分配优化](../problems/1168.optimize-water-distribution-in-a-village.md)
- [1203. 项目管理](../problems/1203.sort-items-by-groups-respecting-dependencies.md)
- [1255. 得分最高的单词集合](../problems/1255.maximum-score-words-formed-by-letters.md)
- [1345. 跳跃游戏 IV](../problems/1435.jump-game-iv.md)
- [1449. 数位成本和为目标值的最大数字](../problems/1449.form-largest-integer-with-digits-that-add-up-to-target.md)
- [5640. 与数组中元素的最大异或值](../problems/5640.maximum-xor-with-an-element-from-array.md)
