文章目录
- STL
- 栈
- 分治
- 思维
- 二分
- 哈希
- 字符串
- 双指针
- 链表
- 数学知识
- 树
- 图
- 动态规划
- DFS
- BFS
- 排序
- 模拟
- 贪心
STL
- ⭐PAT A1112 Stucked Keyboard
- ⭐PAT A1129 Recommendation System
- ⭐【优先队列】PAT A1014 Waiting in Line
栈
- 表达式求值
- ⭐LeetCode 32. Longest Valid Parentheses
- ⭐⭐⭐⭐⭐【单调栈/动态规划】LeetCode 85. Maximal Rectangle
- ⭐⭐⭐⭐⭐【单调栈】LeetCode 84. 柱状图中最大的矩形
分治
- ⭐LeetCode 23. Merge k Sorted Lists
思维
- ⭐LeetCode 31. 下一个排列
- ⭐⭐⭐⭐⭐PAT A1148 Werewolf - Simple Version
二分
- ⭐⭐⭐LeetCode 4. Median of Two Sorted Arrays
- ⭐⭐⭐⭐⭐【二分(非常隐蔽)】PAT A1010 Radix
- ⭐⭐⭐⭐⭐【二分】PAT A1029 Median做过1次依然不会做的题,哭了,主要还是这个题思想有点偏了+我太笨了
- ⭐⭐⭐⭐⭐【二分法+双指针+抽屉原理】LeetCode 287. Find the Duplicate Number
哈希
- ⭐⭐⭐⭐⭐PAT A1145 Hashing - Average Search Time
- ⭐⭐⭐⭐⭐【前缀和+哈希优化】LeetCode 560. Subarray Sum Equals K
字符串
- ⭐PAT A1108 Finding Average
- ⭐⭐⭐⭐⭐【KMP & 最小循环节】Power Strings
- ⭐⭐⭐⭐⭐Seek the Name, Seek the Fame
双指针
天哪,我好像一道双指针都不会!淦!
- ⭐LeetCode 15. 3Sum
- ⭐LeetCode 76. Minimum Window Substring
- ⭐LeetCode 567. Permutation in String
- ⭐LeetCode 11. Container With Most Water
链表
- 快慢指针
- ⭐⭐⭐PAT A1074 Reversing Linked List
- ⭐⭐⭐⭐⭐【链表+归并排序】LeetCode 148. Sort List
数学知识
- 【PAT A1096】Consecutive Factors
- ⭐进制转换2——清华
- ⭐PAT A1152 Google Recruitment
树
- 二叉搜索树——浙大10年
- LeetCode 130. Surrounded Regions
- ⭐LeetCode 128. Longest Consecutive Sequence
- ⭐PAT A1123 Is It a Complete AVL Tree
- ⭐⭐⭐⭐⭐PAT A1143 Lowest Common Ancestor
- ⭐⭐⭐⭐⭐【并查集+树】Is It A Tree?没有理解树的定义,忽视了root的入度一定要为0这个条件
- ⭐⭐⭐⭐⭐【树的遍历和重构】LeetCode 297. Serialize and Deserialize Binary Tree
图
- LeetCode 1129. Shortest Path with Alternating Colors
- ⭐⭐⭐⭐⭐1139 First Contact (30分)
- ⭐⭐⭐⭐⭐PAT A1149 Dangerous Goods Packaging
- ⭐PAT A1072 Gas Station
- ⭐⭐⭐⭐⭐【带其他标尺的Dijkstra+DFS】PAT A1018 Public Bike Management
动态规划
- PAT A1068
- 搬寝室
- Greedy Tino
- Leetcode 10. Regular Expression Matching
- ⭐多重背包——珍惜现在,感恩生活
- ⭐【最大连续子序列和】A - Sum
- ⭐⭐⭐⭐⭐【动态规划】LeetCode 42. Trapping Rain Water
- ⭐⭐⭐【爬楼梯问题变形】LeetCode 300. Longest Increasing Subsequence 很多细节没有考虑到,提交错了好几次!!!
- ⭐⭐⭐⭐⭐【0-1背包变形+恰好装满+可行解】LeetCode 494. Target Sum
- ⭐⭐⭐⭐⭐【动态规划+股票系列】LeetCode 309. Best Time to Buy and Sell Stock with Cooldown
- ⭐⭐⭐⭐⭐【区间DP】LeetCode 312. Burst Balloons
DFS
- ⭐⭐⭐⭐⭐【DFS/剪枝】A - Sticks
- ⭐⭐⭐⭐⭐【图的遍历】POJ 1129 Channel Allocation
- ⭐⭐⭐⭐⭐【中序遍历、验证二叉搜索树】98. Validate Binary Search Tree
- ⭐⭐⭐⭐⭐101. Symmetric Tree
- ⭐⭐⭐⭐⭐【图的DFS进阶】最小路径串(这道题在普通的图DFS上加了遍历的优先级,nice)
- ⭐⭐⭐⭐⭐【网格型、暴力、DFS典型例题】POJ 2488 A Knights Journey
- ⭐⭐⭐⭐⭐【网格型DFS】POJ 2676 Sudoku
- ⭐⭐⭐⭐⭐【网格型DFS+BFS最短路究极版本】POJ 3083 Children of the Candy Corn
- ⭐⭐⭐⭐⭐【应用型DFS+剪枝】A - Sticks 这里的剪枝骚的1p
- ⭐⭐⭐⭐⭐POJ 2362 Square里面有代码细节我写错了
BFS
- ⭐⭐⭐⭐⭐【BFS求最小次数】LeetCode 279. Perfect Squares
- ⭐⭐⭐⭐⭐【BFS求最小次数】LeetCode 301. Remove Invalid Parentheses
- ⭐⭐⭐⭐⭐【多源BFS】LeetCode 1162. As Far from Land as Possible
排序
- ⭐⭐⭐⭐⭐PAT A1095 Cars on Campus
- ⭐PAT A1089 Insert or Merge
模拟
- ⭐PAT A1082 Read Number in Chinese
- ⭐⭐⭐⭐⭐PAT A1060 Are They Equal【变态测试数据】
- ⭐PAT A1061 Dating
贪心
- ⭐⭐⭐⭐⭐【贪心+巧用排序】PAT A1038 Recover the Smallest Number
- ⭐⭐⭐⭐⭐【贪心】PAT A1033 To Fill or Not to Fill
- ⭐⭐⭐⭐⭐【贪心】LeetCode 621. Task Scheduler