LeetCode 刷题笔记

LeetCode 刷题笔记

语言 中文 · 章节 61 · 阅读 16365 · 收藏 0 · 评论 0

记录经典LeetCode题目,总结整理LeetCode题型

共 60 个章节 · 0 条评论
01 2327. Number of People Aware of a Secret[DP] 02 1998. GCD Sort of an Array[因数 素数 并查集] 03 2312. Selling Pieces of Wood[DP] 04 2306. Naming a Company[枚举] 05 2305. Fair Distribution of Cookies[回溯] 06 2286. Booking Concert Tickets in Groups[线段树] 07 2289. Steps to Make Array Non-decreasing[单调栈] 08 2281. Sum of Total Strength of Wizards[psum] 09 2276. Count Integers in Intervals[合并区间] 10 2272. Substring With Largest Variance[MaxSubarraySum] 11 2223. Sum of Scores of Built Strings[z函数] 12 2212. Maximum Points in an Archery Competition[背包问题 最优方案] 13 2132. Stamping the Grid[贪心 trick] 14 2193. Minimum Number of Moves to Make Palindrome[贪心] 15 2188. Minimum Time to Finish the Race[DP] 16 2179. Count Good Triplets in an Array [数组思路转换] 17 2183. Count Array Pairs Divisible by K [GCD性质应用] 18 32. Longest Valid Parentheses 19 1879. Minimum XOR Sum of Two Arrays [状态压缩DP] 20 99. Recover Binary Search Tree 21 97. Interleaving String [一维DP] 22 50. Pow(x, n) 23 2166. Design Bitset [bitset实现] 24 2156. Find Substring With Given Hash Value [Rolling Hash] 25 2141. Maximum Running Time of N Computers [归约] 26 2111. Minimum Operations to Make the Array K-Increasing [LIS] 27 2033. Minimum Operations to Make a Uni-Value Grid [数学] 28 493. Reverse Pairs [归并排序] 29 126. Word Ladder II [BFS 路径记录] 30 18. 4Sum 31 233. Number of Digit One [思路] 32 1754. Largest Merge Of Two Strings [贪心] 33 138. Copy List with Random Pointer [链表] 34 109. Convert Sorted List to Binary Search Tree [AVL Tree] 35 60. Permutation Sequence [排列题目] 36 88. Merge Sorted Array [数组] 37 84. Largest Rectangle in Histogram 38 34. Find First and Last Position of Element in Sorted Array [二分查找模板] 39 1622. Fancy Sequence 取模操作的典例 40 1631. Path With Minimum Effort 图最短路径算法变种 41 1632. Rank Transform of a Matrix 并查集在矩阵中的应用 42 307. Range Sum Query - Mutable 线段树 43 1639. Number of Ways to Form a Target String Given a Dictionary DP(背包)题型 44 1638. Count Substrings That Differ by One Character 暴力解法示例 45 649. Dota2 Senate 贪心 队列 46 220. Contains Duplicate III BucketSort 47 1649. Create Sorted Array through Instructions[树状数组] 48 1654. Minimum Jumps to Reach Home [BFS问题] 49 1659. Maximize Grid Happiness [DP row相关] 50 467. Unique Substrings in Wraparound String [奇妙的DP/Memorization] 51 722. Remove Comments [经典RegEx] 52 424. Longest Repeating Character Replacement [滑动窗口] 53 837. New 21 Game [经典DP, 依赖前N项] 54 1697. Checking Existence of Edge Length Limited Paths [并查集] 55 4. Median of Two Sorted Arrays [分治] 56 10. Regular Expression Matching [DP] 57 11. Container With Most Water [经典2-Pointer] 58 15. 3Sum [经典2-Pointer] 59 25. Reverse Nodes in k-Group [经典链表操作] 60 28. Implement strStr() [KMP]
善良比聪明更重要(评论内容审核后才会显示)
全部评论

RELATED · 延伸阅读

相关书籍