# 困难难度题目合集

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

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

从解法上来说，多是：

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

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

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

以下是我列举的经典题目：

- [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)
- [0301. 删除无效的括号](../problems/301.remove-invalid-parentheses.md)
- [0312. 戳气球](../problems/312.burst-balloons.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)
- [0887. 鸡蛋掉落](../problems/887.super-egg-drop.md)
- [0895. 最大频率栈](../problems/895.maximum-frequency-stack.md)
- [1032. 字符流](../problems/1032.stream-of-characters.md)
- [1168. 水资源分配优化](../problems/1168.optimize-water-distribution-in-a-village.md)
- [1255. 得分最高的单词集合](../problems/1255.maximum-score-words-formed-by-letters.md)
- [1449. 数位成本和为目标值的最大数字](../problems/1449.form-largest-integer-with-digits-that-add-up-to-target.md)
