【刷题目录1】按标签刷LeetCode热题HOT100 java题解分类汇总

2024: 刚开始做leetcode hot100,查阅自己以前写的题解专栏,有些题发现不在这个帖子里(以前没写过),于是加上。
可能leetcode100更新了吧。我看现在leetcode100官网的题目已经是分好类的了,以前我的题解帖子是自己手动分类整理的。

1.栈

【刷题1】LeetCode 20. 有效的括号 java题解
【刷题1】LeetCode 394. 字符串解码 java题解
【刷题1】LeetCode 155. 最小栈 java题解

2.动态规划

【刷题1】LeetCode 53. 最大子序和 java题解
【刷题1】LeetCode 62. 不同路径 java题解
【刷题1】LeetCode 64. 最小路径和 java题解
【刷题1】LeetCode 96. 不同的二叉搜索树 java题解
【刷题1】LeetCode 139. 单词拆分 java题解
【刷题1】LeetCode 221. 最大正方形 java题解
【刷题1】LeetCode 279. 完全平方数 java题解
【刷题1】LeetCode 121. 买卖股票的最佳时机 java题解
【刷题1】LeetCode 309. 最佳买卖股票时机含冷冻期 java题解
【刷题1】Leetcode 322. 零钱兑换 java题解
【刷题1】LeetCode 198. 打家劫舍 java题解
【刷题1】LeetCode 213. 打家劫舍 II java题解(这题不在hot100,但打家劫舍三题相关,所以也放进来)
【刷题1】LeetCode 337. 打家劫舍 III java题解
【刷题1】LeetCode 42. 接雨水 java题解
【刷题1】LeetCode 85. 最大矩形 java题解
【刷题1】LeetCode 312. 戳气球 java题解

字符串 ※

【刷题1】LeetCode 5. 最长回文子串 java题解
【刷题1】LeetCode 647. 回文子串 java题解
【刷题1】LeetCode 32. 最长有效括号 java题解
【刷题1】LeetCode 72. 编辑距离 java题解

数组※

【刷题1】LeetCode 300. 最长上升子序列 java题解
【刷题1】LeetCode 152. 乘积最大子数组 java题解

01背包※

【刷题1】LeetCode 494. 目标和 java题解
【刷题1】LeetCode 416. 分割等和子集 java题解

3.树

【刷题1】LeetCode 94. 二叉树的中序遍历 java题解
【刷题1】LeetCode 98. 验证二叉搜索树 java题解
【刷题1】LeetCode 101. 对称二叉树 java题解
【刷题1】LeetCode 102. 二叉树的层序遍历 java题解
【刷题1】LeetCode 105. 从前序与中序遍历序列构造二叉树 java题解
【刷题1】LeetCode 114. 二叉树展开为链表 java题解
【刷题1】LeetCode 124. 二叉树中的最大路径和 java题解
【刷题1】LeetCode 226. 翻转二叉树 java题解
【刷题1】LeetCode 337. 打家劫舍 III java题解
【刷题1】LeetCode 543. 二叉树的直径 java题解
【刷题1】LeetCode 437. 路径总和 III java题解
【刷题1】LeetCode 617. 合并二叉树 java题解
【刷题1】LeetCode 538. 把二叉搜索树转换为累加树 java题解

4.滑动窗口&双指针

【刷题1】LeetCode 3. 无重复字符的最长子串 java题解
【刷题1】LeetCode 11. 盛最多水的容器 java题解
【刷题1】LeetCode 15. 三数之和 java题解
【刷题1】LeetCode 75. 颜色分类 java题解
【刷题1】LeetCode 141. 环形链表 java题解
【刷题1】LeetCode 142. 环形链表 II java题解
【刷题1】LeetCode 234. 回文链表 java题解
【刷题1】LeetCode 283. 移动零 java题解
【刷题1】LeetCode 239. 滑动窗口最大值 java题解
【刷题1】LeetCode 42. 接雨水 java题解
【刷题1】LeetCode 581. 最短无序连续子数组 java题解
【刷题1】LeetCode 32. 最长有效括号 java题解
【刷题1】LeetCode 76. 最小覆盖子串 java题解

5.链表

【刷题1】LeetCode 2. 两数相加 java题解
【刷题1】LeetCode 141. 环形链表 java题解
【刷题1】LeetCode 142. 环形链表 II java题解
【刷题1】LeetCode 234. 回文链表 java题解
【刷题1】LeetCode 146. LRU缓存机制 java题解
【刷题1】LeetCode 19. 删除链表的倒数第N个节点 java题解
【刷题1】LeetCode 21. 合并两个有序链表 java题解
【刷题1】LeetCode 148. 排序链表 java题解
【刷题1】LeetCode 24. 两两交换链表中的节点 java题解

【刷题1】LeetCode 215. 数组中的第K个最大元素 java题解
【刷题1】LeetCode 347. 前 K 个高频元素 java题解
【刷题1】LeetCode 23. 合并K个升序链表 java题解

贪心算法

【刷题1】LeetCode 55. 跳跃游戏 java题解
【刷题1】LeetCode 406. 根据身高重建队列 java题解
【刷题1】LeetCode 621. 任务调度器 java题解

排序

【刷题1】LeetCode 148. 排序链表 java题解

位运算

【刷题1】LeetCode 338. 比特位计数 java题解
【刷题1】LeetCode 461. 汉明距离 java题解

深度优先搜索&广度优先搜索&回溯法

【刷题1】LeetCode 17. 电话号码的字母组合 java题解
【刷题1】LeetCode 279. 完全平方数 java题解
【刷题1】LeetCode 200. 岛屿数量 java题解
【刷题1】LeetCode 207. 课程表 java题解
【刷题1】LeetCode 22. 括号生成 java题解
【刷题1】LeetCode 39. 组合总和 java题解
【刷题1】LeetCode 46. 全排列 java题解
【刷题1】LeetCode 78. 子集 java题解
【刷题1】LeetCode 79. 单词搜索 java题解
【刷题1】LeetCode 301. 删除无效的括号 java题解
【刷题1】LeetCode 131. 分割回文串 java题解

图论

【刷题1】LeetCode 994. 腐烂的橘子 java题解

数组

【刷题1】LeetCode 448. 找到所有数组中消失的数字 java题解
【刷题1】LeetCode 31. 下一个排列 java题解
【刷题1】LeetCode 48. 旋转图像 java题解
【刷题1】LeetCode 56. 合并区间 java题解

分治

【刷题1】LeetCode 169. 多数元素 java题解

二分查找 ※

【刷题1】LeetCode 74. 搜索二维矩阵 java题解(这题不在hot100,但作为搜索二维矩阵2的铺垫,所以也放进来)
【刷题1】LeetCode 240. 搜索二维矩阵 II java题解
【刷题1】LeetCode 33. 搜索旋转排序数组 java题解
【刷题1】LeetCode 153. 寻找旋转排序数组中的最小值 java题解
【刷题1】LeetCode 34. 在排序数组中查找元素的第一个和最后一个位置 java题解
【刷题1】LeetCode 4. 寻找两个正序数组的中位数 java题解

字符串

【刷题1】LeetCode 49. 字母异位词分组 java题解

哈希表

【刷题1】LeetCode 1. 两数之和 java题解
【刷题1】LeetCode 560. 和为K的子数组 java题解

【刷题1】LeetCode 128. 最长连续序列 java题解

【刷题1】LeetCode 41. 缺失的第一个正数 java题解

单调栈

【刷题1】LeetCode 84. 柱状图中最大的矩形 java题解
【刷题1】LeetCode 739. 每日温度 java题解

设计 ※

【刷题1】LeetCode 208. 实现 Trie (前缀树) java题解

1. Two Sum 2. Add Two Numbers 3. Longest Substring Without Repeating Characters 4. Median of Two Sorted Arrays 5. Longest Palindromic Substring 6. ZigZag Conversion 7. Reverse Integer 8. String to Integer (atoi) 9. Palindrome Number 10. Regular Expression Matching 11. Container With Most Water 12. Integer to Roman 13. Roman to Integer 14. Longest Common Prefix 15. 3Sum 16. 3Sum Closest 17. Letter Combinations of a Phone Number 18. 4Sum 19. Remove Nth Node From End of List 20. Valid Parentheses 21. Merge Two Sorted Lists 22. Generate Parentheses 23. Swap Nodes in Pairs 24. Reverse Nodes in k-Group 25. Remove Duplicates from Sorted Array 26. Remove Element 27. Implement strStr() 28. Divide Two Integers 29. Substring with Concatenation of All Words 30. Next Permutation 31. Longest Valid Parentheses 32. Search in Rotated Sorted Array 33. Search for a Range 34. Find First and Last Position of Element in Sorted Array 35. Valid Sudoku 36. Sudoku Solver 37. Count and Say 38. Combination Sum 39. Combination Sum II 40. First Missing Positive 41. Trapping Rain Water 42. Jump Game 43. Merge Intervals 44. Insert Interval 45. Unique Paths 46. Minimum Path Sum 47. Climbing Stairs 48. Permutations 49. Permutations II 50. Rotate Image 51. Group Anagrams 52. Pow(x, n) 53. Maximum Subarray 54. Spiral Matrix 55. Jump Game II 56. Merge k Sorted Lists 57. Insertion Sort List 58. Sort List 59. Largest Rectangle in Histogram 60. Valid Number 61. Word Search 62. Minimum Window Substring 63. Unique Binary Search Trees 64. Unique Binary Search Trees II 65. Interleaving String 66. Maximum Product Subarray 67. Binary Tree Inorder Traversal 68. Binary Tree Preorder Traversal 69. Binary Tree Postorder Traversal 70. Flatten Binary Tree to Linked List 71. Construct Binary Tree from Preorder and Inorder Traversal 72. Construct Binary Tree from Inorder and Postorder Traversal 73. Binary Tree Level Order Traversal 74. Binary Tree Zigzag Level Order Traversal 75. Convert Sorted Array to Binary Search Tree 76. Convert Sorted List to Binary Search Tree 77. Recover Binary Search Tree 78. Sum Root to Leaf Numbers 79. Path Sum 80. Path Sum II 81. Binary Tree Maximum Path Sum 82. Populating Next Right Pointers in Each Node 83. Populating Next Right Pointers in Each Node II 84. Reverse Linked List 85. Reverse Linked List II 86. Partition List 87. Rotate List 88. Remove Duplicates from Sorted List 89. Remove Duplicates from Sorted List II 90. Intersection of Two Linked Lists 91. Linked List Cycle 92. Linked List Cycle II 93. Reorder List 94. Binary Tree Upside Down 95. Binary Tree Right Side View 96. Palindrome Linked List 97. Convert Binary Search Tree to Sorted Doubly Linked List 98. Lowest Common Ancestor of a Binary Tree 99. Lowest Common Ancestor of a Binary Search Tree 100. Binary Tree Level Order Traversal II
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值