chunyang-zhang / Algorithm

记录LeetCode、牛客上各种算法题的解法,尽可能的对每道题实现多种解法,在过程中学习思路以及解题过程。使用Java和Python两种语言编写题解,力求得心应手。(本项目只包含题解代码,如有精彩的题目将同步更新题解说明文章到CSDN和知乎)

Home Page:https://www.zhihu.com/people/dengbocong

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Algorithm | Still work

记录LeetCode、牛客上各种算法题的解法,尽可能的对每道题实现多种解法,在过程中学习思路以及解题过程。使用Java和Python两种语言编写题解,力求得心应手。(本项目只包含题解代码,如有精彩的题目将同步更新题解说明文章到CSDN知乎)

项目结构

题目类别

动态规划

  1. LeetCode:使用最小花费爬楼梯 | 题目截图 | Python解法 | Java解法

  2. LeetCode:买卖股票的最佳时机 | 题目截图 | Python解法 | Java解法

  3. LeetCode:买卖股票的最佳时机 II | 题目截图 | Python解法 | Java解法

  4. LeetCode:买卖股票的最佳时机 III | 题目截图 | Python解法 | Java解法

  5. LeetCode:买卖股票的最佳时机 IV | 题目截图 | Python解法 | Java解法

  6. LeetCode:最佳买卖股票时机含冷冻期 | 题目截图 | Python解法 | Java解法

  7. LeetCode:买卖股票的最佳时机含手续费 | 题目截图 | Python解法 | Java解法

  8. LeetCode:最长递增子序列的个数 | 题目截图 | Python解法 | Java解法

并查集

  1. LeetCode:省份数量 | 题目截图 | Python解法 | Java解法

  2. LeetCode:冗余连接 | 题目截图 | Python解法 | Java解法

  3. LeetCode:冗余连接 II | 题目截图 | Python解法 | Java解法

  4. LeetCode:打砖块 | 题目截图 | Python解法 | Java解法

  5. LeetCode:账户合并 | 题目截图 | Python解法 | Java解法

  6. LeetCode:移除最多的同行或同列石头 | 题目截图 | Python解法 | Java解法

  7. LeetCode:连接所有点的最小费用 | 题目截图 | Python解法 | Java解法

  8. LeetCode:找到最小生成树里的关键边和伪关键边 | 题目截图 | Python解法 | Java解法

  9. LeetCode:连通网络的操作次数 | 题目截图 | Python解法 | Java解法

  10. LeetCode:由斜杠划分区域 | 题目截图 | Python解法 | Java解法

  11. LeetCode:保证图可完全遍历 | 题目截图 | Python解法 | Java解法

  12. LeetCode:最小体力消耗路径 | 题目截图 | Python解法 | Java解法

  13. LeetCode:水位上升的泳池中游泳 | 题目截图 | Python解法 | Java解法

  14. LeetCode:相似字符串组 | 题目截图 | Python解法 | Java解法

路径

  1. LeetCode:最小体力消耗路径 | 题目截图 | Python解法 | Java解法

  2. LeetCode:水位上升的泳池中游泳 | 题目截图 | Python解法 | Java解法

队列

  1. LeetCode:滑动窗口最大值 | 题目截图 | Python解法 | Java解法

  2. LeetCode:滑动窗口中位数 | 题目截图 | Python解法 | Java解法

  3. LeetCode:数据流的中位数 | 题目截图 | Python解法 | Java解法

数学

  1. LeetCode:缀点成线 | 题目截图 | Python解法 | Java解法

  2. LeetCode:三个数的最大乘积 | 题目截图 | Python解法 | Java解法

位运算

  1. LeetCode:解码异或后的数组 | 题目截图 | Python解法 | Java解法

链表

  1. LeetCode:交换链表中的节点 | 题目截图 | Python解法 | Java解法

数组

  1. LeetCode:可被 5 整除的二进制前缀 | 题目截图 | Python解法 | Java解法

  2. LeetCode:数组形式的整数加法 | 题目截图 | Python解法 | Java解法

  3. LeetCode:种花问题 | 题目截图 | Python解法 | Java解法

  4. LeetCode:最长连续递增序列 | 题目截图 | Python解法 | Java解法

  5. LeetCode:等价多米诺骨牌对的数量 | 题目截图 | Python解法 | Java解法

  6. LeetCode:寻找数组的中心索引 | 题目截图 | Python解法 | Java解法

  7. LeetCode:和为K的子数组 | 题目截图 | Python解法 | Java解法

  8. LeetCode:连续的子数组和 | 题目截图 | Python解法 | Java解法

  9. LeetCode:公平的糖果棒交换 | 题目截图 | Python解法 | Java解法

  10. LeetCode:最大连续1的个数 | 题目截图 | Python解法 | Java解法

  11. LeetCode:最大连续1的个数 III | 题目截图 | Python解法 | Java解法

  12. LeetCode:子数组最大平均数 I | 题目截图 | Python解法 | Java解法

指针

  1. LeetCode:最小覆盖子串 | 题目截图 | Python解法 | Java解法

  2. LeetCode:替换后的最长重复字符 | 题目截图 | Python解法 | Java解法

  1. LeetCode:二叉搜索树中的搜索 | 题目截图 | Python解法 | Java解法

  2. LeetCode:寻找重复的子树 | 题目截图 | Python解法 | Java解法

Subject List | 题目列表

1、两数之和 测试地址:https://leetcode-cn.com/problems/two-sum/

2、两数相加 测试地址:https://leetcode-cn.com/problems/add-two-numbers/

3、无重复字符的最长子串* 测试地址:https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/

4、寻找两个有序数组的中位数 测试地址:https://leetcode-cn.com/problems/median-of-two-sorted-arrays/

5、最长回文子串* 测试地址:https://leetcode-cn.com/problems/longest-palindromic-substring/

6、最大数* 测试地址:https://leetcode-cn.com/problems/largest-number/

7、Z字形变换 测试地址:https://leetcode-cn.com/problems/zigzag-conversion/submissions/

8、整数反转 测试地址:https://leetcode-cn.com/problems/reverse-integer/

9、字符串转换整数(atoi) 测试地址:https://leetcode-cn.com/problems/string-to-integer-atoi/

10、回文数 测试地址:https://leetcode-cn.com/problems/palindrome-number/

11、正则表达式匹配 测试地址:https://leetcode-cn.com/problems/regular-expression-matching/

12、盛最多水容器 测试地址:https://leetcode-cn.com/problems/container-with-most-water/

13、整数转罗马数字 测试地址:https://leetcode-cn.com/problems/integer-to-roman/

14、罗马数字转整数 测试地址:https://leetcode-cn.com/problems/roman-to-integer/

15、最长公共前缀 测试地址:https://leetcode-cn.com/problems/longest-common-prefix/

16、三数之和 测试地址:https://leetcode-cn.com/problems/3sum/submissions/

17、最近接近的三数之和 测试地址:https://leetcode-cn.com/problems/3sum-closest/

18、电话号码的字母组合 测试地址:https://leetcode-cn.com/problems/letter-combinations-of-a-phone-number/

19、四数之和 测试地址:https://leetcode-cn.com/problems/4sum/

20、删除链表的第N个节点 测试地址:https://leetcode-cn.com/problems/remove-nth-node-from-end-of-list/

21、有效的括号 测试地址:https://leetcode-cn.com/problems/valid-parentheses/

22、合并两个有序链表 测试地址:https://leetcode-cn.com/problems/merge-two-sorted-lists/

23、括号生成 测试地址:https://leetcode-cn.com/problems/generate-parentheses/

24、合成K个排序链表 测试地址:https://leetcode-cn.com/problems/merge-k-sorted-lists/

25、两两交换链表中的节点 测试地址:https://leetcode-cn.com/problems/swap-nodes-in-pairs/

26、K个一组翻转链表 测试地址:https://leetcode-cn.com/problems/reverse-nodes-in-k-group/

27、删除排序数组中的重复项 测试地址:https://leetcode-cn.com/problems/remove-duplicates-from-sorted-array/

28、移出元素 测试地址:https://leetcode-cn.com/problems/remove-element/

29、实现strStr() 测试地址:https://leetcode-cn.com/problems/implement-strstr/

30、两数相除 测试地址:https://leetcode-cn.com/problems/divide-two-integers/

31、下一个队列 测试地址:https://leetcode-cn.com/problems/next-permutation/

32、串联所有单词的子串 测试地址:https://leetcode-cn.com/problems/substring-with-concatenation-of-all-words/

33、最长有效括号 测试地址:https://leetcode-cn.com/problems/longest-valid-parentheses/

34、搜索旋转排序数组 测试地址:https://leetcode-cn.com/problems/search-in-rotated-sorted-array/

35、在排序数组中查找元素的第一个和最后一个位置 测试地址:https://leetcode-cn.com/problems/find-first-and-last-position-of-element-in-sorted-array/

36、搜索插入位置 测试地址:https://leetcode-cn.com/problems/search-insert-position/

37、有效的数独 测试地址:https://leetcode-cn.com/problems/valid-sudoku/

38、解数独 测试地址:https://leetcode-cn.com/problems/sudoku-solver/

39、报数 测试地址:https://leetcode-cn.com/problems/count-and-say/

40、组合总和 测试地址:https://leetcode-cn.com/problems/combination-sum/

41、组合总和2 测试地址:https://leetcode-cn.com/problems/combination-sum-ii/

42、缺失的第一个正数 测试地址:https://leetcode-cn.com/problems/first-missing-positive/

43、接雨水 测试地址:https://leetcode-cn.com/problems/trapping-rain-water/

44、字符串相乘 测试地址:https://leetcode-cn.com/problems/multiply-strings/

45、通配符匹配 测试地址:https://leetcode-cn.com/problems/wildcard-matching/

46、跳跃游戏2 测试地址:https://leetcode-cn.com/problems/jump-game-ii/

47、全排列 测试地址:https://leetcode-cn.com/problems/permutations/

48、全排列2 测试地址:https://leetcode-cn.com/problems/permutations-ii/

49、旋转图片 测试地址:https://leetcode-cn.com/problems/rotate-image/

49、字母异位词分组 测试地址:https://leetcode-cn.com/problems/group-anagrams/

50、Pow(x,n) 测试地址:https://leetcode-cn.com/problems/powx-n/

51、N皇后 测试地址:https://leetcode-cn.com/problems/n-queens/

52、N皇后2 测试地址:https://leetcode-cn.com/problems/n-queens-ii/

53、最大子序和 测试地址:https://leetcode-cn.com/problems/maximum-subarray/

54、螺旋矩阵 测试地址:https://leetcode-cn.com/problems/spiral-matrix/

55、跳跃游戏 测试地址:https://leetcode-cn.com/problems/jump-game/

56、合并区间 测试地址:https://leetcode-cn.com/problems/merge-intervals/

57、插入区间 测试地址:https://leetcode-cn.com/problems/insert-interval/

58、最后一个单词的长度 测试地址:https://leetcode-cn.com/problems/length-of-last-word/

59、螺旋矩阵2 测试地址:https://leetcode-cn.com/problems/spiral-matrix-ii/

60、第k个排列 测试地址:https://leetcode-cn.com/problems/permutation-sequence/

61、旋转链表 测试地址:https://leetcode-cn.com/problems/rotate-list/

62、不同路径 测试地址:https://leetcode-cn.com/problems/unique-paths/

63、不同路径2 测试地址:https://leetcode-cn.com/problems/unique-paths-ii/

64、最小路径和 测试地址:https://leetcode-cn.com/problems/minimum-path-sum/

65、有效数字 测试地址:https://leetcode-cn.com/problems/valid-number/

66、加一 测试地址:https://leetcode-cn.com/problems/plus-one/

67、二进制求和 测试地址:https://leetcode-cn.com/problems/add-binary/

68、文本左右对齐 测试地址:https://leetcode-cn.com/problems/text-justification/

69、x的平方根 测试地址:https://leetcode-cn.com/problems/sqrtx/

70、爬楼梯 测试地址:https://leetcode-cn.com/problems/climbing-stairs/

71、简化路径 测试地址:https://leetcode-cn.com/problems/simplify-path/

72、编辑距离 测试地址:https://leetcode-cn.com/problems/edit-distance/

73、矩阵置零 测试地址:https://leetcode-cn.com/problems/set-matrix-zeroes/

74、搜索二维矩阵 测试地址:https://leetcode-cn.com/problems/search-a-2d-matrix/

75、颜色分类 测试地址:https://leetcode-cn.com/problems/sort-colors/

76、最小覆盖子串 测试地址:https://leetcode-cn.com/problems/minimum-window-substring/

77、组合 测试地址:https://leetcode-cn.com/problems/combinations/

78、子集 测试地址:https://leetcode-cn.com/problems/subsets/

79、单词搜索 测试地址:https://leetcode-cn.com/problems/word-search/

80、删除排序数组中的重复项2 测试地址:https://leetcode-cn.com/problems/remove-duplicates-from-sorted-array-ii/

81、搜索旋转排序数组2 测试地址:https://leetcode-cn.com/problems/search-in-rotated-sorted-array-ii/

82、删除排序链表中的重复元素2 测试地址:https://leetcode-cn.com/problems/remove-duplicates-from-sorted-list-ii/

83、删除排序链表中的重复元素 测试地址:https://leetcode-cn.com/problems/remove-duplicates-from-sorted-list/

84、柱状图中最大的矩形 测试地址:https://leetcode-cn.com/problems/largest-rectangle-in-histogram/

85、最大矩形 测试地址:https://leetcode-cn.com/problems/maximal-rectangle/

86、分隔链表 测试地址:https://leetcode-cn.com/problems/partition-list/

88、扰乱字符串 测试地址:https://leetcode-cn.com/problems/scramble-string/

89、合并两个有序数组 测试地址:https://leetcode-cn.com/problems/merge-sorted-array/

90、格雷编码 测试地址:https://leetcode-cn.com/problems/gray-code/

91、子集2 测试地址:https://leetcode-cn.com/problems/subsets-ii/

92、解码方法 测试地址:https://leetcode-cn.com/problems/decode-ways/

93、反转链表 测试地址:https://leetcode-cn.com/problems/reverse-linked-list-ii/

94、复制IP地址 测试地址:https://leetcode-cn.com/problems/restore-ip-addresses/

95、二叉树的中序遍历 测试地址:https://leetcode-cn.com/problems/binary-tree-inorder-traversal/

96、不同的二叉搜索树2 测试地址:https://leetcode-cn.com/problems/unique-binary-search-trees-ii/

97、不同的二叉搜索树2 测试地址:https://leetcode-cn.com/problems/unique-binary-search-trees/

98、交错字符串 测试地址:https://leetcode-cn.com/problems/interleaving-string/

99、验证二叉搜索树 测试地址:https://leetcode-cn.com/problems/validate-binary-search-tree/

100、恢复二叉搜索树 测试地址:https://leetcode-cn.com/problems/recover-binary-search-tree/

101、相同的树 测试地址:https://leetcode-cn.com/problems/same-tree/

102、对称二叉树 测试地址:https://leetcode-cn.com/problems/symmetric-tree/

103、二叉树的层次遍历 测试地址:https://leetcode-cn.com/problems/binary-tree-level-order-traversal/

104、二叉树的锯齿形层次遍历 测试地址:https://leetcode-cn.com/problems/binary-tree-zigzag-level-order-traversal/

105、二叉树的最大深度 测试地址:https://leetcode-cn.com/problems/maximum-depth-of-binary-tree/

106、从前序与中序遍历序列构造二叉树 测试地址:https://leetcode-cn.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/

107、从中序与后序遍历序列构造二叉树 测试地址:https://leetcode-cn.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/

108、二叉树的层次遍历2 测试地址:https://leetcode-cn.com/problems/binary-tree-level-order-traversal-ii/

109、将有序数组转换为二叉搜索树 测试地址:https://leetcode-cn.com/problems/convert-sorted-array-to-binary-search-tree/

110、有序链表转换二叉搜索树 测试地址:https://leetcode-cn.com/problems/convert-sorted-list-to-binary-search-tree/

111、有序链表转换二叉搜索树 测试地址:https://leetcode-cn.com/problems/balanced-binary-tree/

112、二叉树的最小深度 测试地址:https://leetcode-cn.com/problems/minimum-depth-of-binary-tree/

113、路径总和 测试地址:https://leetcode-cn.com/problems/path-sum/

114、路径总和2 测试地址:https://leetcode-cn.com/problems/path-sum-ii/

115、二叉树展开为链表 测试地址:https://leetcode-cn.com/problems/flatten-binary-tree-to-linked-list/

116、不同的子序列 测试地址:https://leetcode-cn.com/problems/distinct-subsequences/

117、填充每个节点的下一个右侧节点指针 测试地址:https://leetcode-cn.com/problems/populating-next-right-pointers-in-each-node/

118、填充每个节点的下一个右侧节点指针2 测试地址:https://leetcode-cn.com/problems/populating-next-right-pointers-in-each-node-ii/

119、杨辉三角 测试地址:https://leetcode-cn.com/problems/pascals-triangle/

120、杨辉三角2 测试地址:https://leetcode-cn.com/problems/pascals-triangle-ii/

121、三角形最小路径和 测试地址:https://leetcode-cn.com/problems/triangle/

122、买卖股票的最佳时机 测试地址:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock/

123、买卖股票的最佳时机2 测试地址:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-ii/

124、买卖股票的最佳时机3 测试地址:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-iii/

125、二叉树中的最大路径和 测试地址:https://leetcode-cn.com/problems/binary-tree-maximum-path-sum/

126、验证回文串 测试地址:https://leetcode-cn.com/problems/valid-palindrome/

127、单词接龙 测试地址:https://leetcode-cn.com/problems/word-ladder/

128、单词接龙2 测试地址:https://leetcode-cn.com/problems/word-ladder-ii/

129、最长连续序列 测试地址:https://leetcode-cn.com/problems/longest-consecutive-sequence/

130、求根到叶子节点数字之和 测试地址:https://leetcode-cn.com/problems/sum-root-to-leaf-numbers/

131、被围绕的区域 测试地址:https://leetcode-cn.com/problems/surrounded-regions/

132、分割回文串 测试地址:https://leetcode-cn.com/problems/palindrome-partitioning/

133、分割回文串2 测试地址:https://leetcode-cn.com/problems/palindrome-partitioning-ii/

134、克隆图 测试地址:https://leetcode-cn.com/problems/clone-graph/

135、加油站 测试地址:https://leetcode-cn.com/problems/gas-station/

136、分发糖果 测试地址:https://leetcode-cn.com/problems/candy/

137、只出现一次的数字 测试地址:https://leetcode-cn.com/problems/single-number/

138、只出现一次的数字2 测试地址:https://leetcode-cn.com/problems/single-number-ii/

139、复制带随机指针的链表 测试地址:https://leetcode-cn.com/problems/copy-list-with-random-pointer/

140、单词拆分 测试地址:https://leetcode-cn.com/problems/word-break/

141、单词拆分2 测试地址:https://leetcode-cn.com/problems/word-break-ii/

142、环形链表 测试地址:https://leetcode-cn.com/problems/linked-list-cycle/

143、环形链表2 测试地址:https://leetcode-cn.com/problems/word-break-ii/

144、重排链表 测试地址:https://leetcode-cn.com/problems/linked-list-cycle/

145、二叉树的前序遍历 测试地址:https://leetcode-cn.com/problems/binary-tree-preorder-traversal/

146、二叉树的后序遍历 测试地址:https://leetcode-cn.com/problems/binary-tree-postorder-traversal/

147、LRU缓存机制 测试地址:https://leetcode-cn.com/problems/lru-cache/

148、对链表进行插入排序 测试地址:https://leetcode-cn.com/problems/insertion-sort-list/

149、排序链表 测试地址:https://leetcode-cn.com/problems/sort-list/

150、逆波兰表达式求职 测试地址:https://leetcode-cn.com/problems/evaluate-reverse-polish-notation/

151、翻转字符串里的单词 测试地址:https://leetcode-cn.com/problems/reverse-words-in-a-string/

152、乘积最大子序列 测试地址:https://leetcode-cn.com/problems/maximum-product-subarray/

153、寻找旋转排序数组中的最小值 测试地址:https://leetcode-cn.com/problems/find-minimum-in-rotated-sorted-array/

154、寻找旋转排序数组中的最小值2 测试地址:https://leetcode-cn.com/problems/find-minimum-in-rotated-sorted-array-ii/

155、最小栈 测试地址:https://leetcode-cn.com/problems/min-stack/

156、相交链表 测试地址:https://leetcode-cn.com/problems/intersection-of-two-linked-lists/

157、寻找峰值 测试地址:https://leetcode-cn.com/problems/find-peak-element/

158、最大间距 测试地址:https://leetcode-cn.com/problems/maximum-gap/

159、比较版本号 测试地址:https://leetcode-cn.com/problems/compare-version-numbers/

160、分数到小数 测试地址:https://leetcode-cn.com/problems/fraction-to-recurring-decimal/

161、两数之和2-输入有序数组 测试地址:https://leetcode-cn.com/problems/two-sum-ii-input-array-is-sorted/

162、Excel表列名称 测试地址:https://leetcode-cn.com/problems/excel-sheet-column-title/

163、多数元素 测试地址:https://leetcode-cn.com/problems/majority-element/

164、Excel表列序号 测试地址:https://leetcode-cn.com/problems/excel-sheet-column-number/

165、阶乘后的零 测试地址:https://leetcode-cn.com/problems/factorial-trailing-zeroes/

166、二叉树搜索树迭代器 测试地址:https://leetcode-cn.com/problems/binary-search-tree-iterator/

167、地下城游戏 测试地址:https://leetcode-cn.com/problems/dungeon-game/

168、组合两个表 测试地址:https://leetcode-cn.com/problems/combine-two-tables/

169、第二高的薪水 测试地址:https://leetcode-cn.com/problems/second-highest-salary/

170、第N高的薪水 测试地址:https://leetcode-cn.com/problems/nth-highest-salary/

171、分数排名 测试地址:https://leetcode-cn.com/problems/rank-scores/

172、连续出现的数字 测试地址:https://leetcode-cn.com/problems/consecutive-numbers/

173、超过经理收入的员工 测试地址:https://leetcode-cn.com/problems/employees-earning-more-than-their-managers/

174、查找重复的电子邮箱 测试地址:https://leetcode-cn.com/problems/duplicate-emails/

175、从不订购的客户 测试地址:https://leetcode-cn.com/problems/customers-who-never-order/

176、部门工资最高的员工 测试地址:https://leetcode-cn.com/problems/department-highest-salary/

177、部门工资前三高的所有员工 测试地址:https://leetcode-cn.com/problems/department-top-three-salaries/

178、重复的DNA序列2 测试地址:https://leetcode-cn.com/problems/repeated-dna-sequences/

179、买卖股票的最佳时机 测试地址:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-iv/

180、旋转数组 测试地址:https://leetcode-cn.com/problems/rotate-array/

181、颠倒二进制位 测试地址:https://leetcode-cn.com/problems/reverse-bits/

182、位1的个数 测试地址:https://leetcode-cn.com/problems/number-of-1-bits/

183、统计词频 测试地址:https://leetcode-cn.com/problems/word-frequency/

184、有效电话号码 测试地址:https://leetcode-cn.com/problems/valid-phone-numbers/

185、转置文件 测试地址:https://leetcode-cn.com/problems/transpose-file/

<<<<<<< HEAD 186、第十行 测试地址:https://leetcode-cn.com/problems/tenth-line/

187、删除重复的电子邮箱 测试地址:https://leetcode-cn.com/problems/delete-duplicate-emails/

188、上升的温度 测试地址:https://leetcode-cn.com/problems/rising-temperature/

======= 186、直线上最多的点数 测试地址:https://leetcode-cn.com/problems/max-points-on-a-line/

187、打家劫舍 测试地址:https://leetcode-cn.com/problems/house-robber/

188、二叉树右视图 测试地址:https://leetcode-cn.com/problems/binary-tree-right-side-view/

local

189、岛屿数量 测试地址:https://leetcode-cn.com/problems/number-of-islands/

190、数字范围按位与 测试地址:https://leetcode-cn.com/problems/bitwise-and-of-numbers-range/

191、快乐数 测试地址:https://leetcode-cn.com/problems/happy-number/

192、移除链表元素 测试地址:https://leetcode-cn.com/problems/remove-linked-list-elements/

193、计数质数 测试地址:https://leetcode-cn.com/problems/count-primes/

194、同构字符串 测试地址:https://leetcode-cn.com/problems/isomorphic-strings/

197、反转链表 测试地址:https://leetcode-cn.com/problems/reverse-linked-list/

198、课程表 测试地址:https://leetcode-cn.com/problems/course-schedule/

199、实现Trie(前缀树) 测试地址:https://leetcode-cn.com/problems/implement-trie-prefix-tree/

200、长度最小的子数组 测试地址:https://leetcode-cn.com/problems/minimum-size-subarray-sum/

201、课程表2 测试地址:https://leetcode-cn.com/problems/course-schedule-ii/

202、添加与搜索单词-数据结构设计 测试地址:https://leetcode-cn.com/problems/add-and-search-word-data-structure-design/

203、单词搜索2 测试地址:https://leetcode-cn.com/problems/word-search-ii/

204、打家劫舍2 测试地址:https://leetcode-cn.com/problems/house-robber-ii/

205、最短回文串 测试地址:https://leetcode-cn.com/problems/shortest-palindrome/

206、数组中的第K个最大元素 测试地址:https://leetcode-cn.com/problems/kth-largest-element-in-an-array/

207、组合总和2 测试地址:https://leetcode-cn.com/problems/combination-sum-iii/

208、存在重复元素 测试地址:https://leetcode-cn.com/problems/contains-duplicate/

209、天际线问题 测试地址:https://leetcode-cn.com/problems/the-skyline-problem/

210、存在重复元素2 测试地址:https://leetcode-cn.com/problems/contains-duplicate-ii/

211、存在重复元素3 测试地址:https://leetcode-cn.com/problems/contains-duplicate-iii/

212、最大正方形 测试地址:https://leetcode-cn.com/problems/maximal-square/

213、完全二叉树的节点个数 测试地址:https://leetcode-cn.com/problems/count-complete-tree-nodes/

214、矩形面积 测试地址:https://leetcode-cn.com/problems/rectangle-area/

215、基本计算器 测试地址:https://leetcode-cn.com/problems/basic-calculator/

216、用队列实现栈 测试地址:https://leetcode-cn.com/problems/implement-stack-using-queues/

217、翻转二叉树 测试地址:https://leetcode-cn.com/problems/invert-binary-tree/

218、基本计算器2 测试地址:https://leetcode-cn.com/problems/basic-calculator-ii/

219、汇总区间 测试地址:https://leetcode-cn.com/problems/summary-ranges/

220、求众数2 测试地址:https://leetcode-cn.com/problems/majority-element-ii/

221、二叉搜索树中第K小的元素 测试地址:https://leetcode-cn.com/problems/kth-smallest-element-in-a-bst/

222、2的幂 测试地址:https://leetcode-cn.com/problems/power-of-two/

223、用栈实现队列 测试地址:https://leetcode-cn.com/problems/implement-queue-using-stacks/

224、数字1的个数 测试地址:https://leetcode-cn.com/problems/number-of-digit-one/

225、回文链表 测试地址:https://leetcode-cn.com/problems/palindrome-linked-list/

226、二叉搜索树的最近公共祖先 测试地址:https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-search-tree/

227、二叉树的最近公共最先 测试地址:https:https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-tree/

228、删除链表中的节点 测试地址:https://leetcode-cn.com/problems/delete-node-in-a-linked-list/

229、除自身外数组的乘积 测试地址:https://leetcode-cn.com/problems/product-of-array-except-self/

230、滑动窗口最大值 测试地址:https://leetcode-cn.com/problems/sliding-window-maximum/

231、搜索二维矩阵2 测试地址:https://leetcode-cn.com/problems/search-a-2d-matrix-ii/

232、为运算表达式设计优先级 测试地址:https://leetcode-cn.com/problems/different-ways-to-add-parentheses/

233、有效的字母异位词 测试地址:https://leetcode-cn.com/problems/valid-anagram/

234、二叉树的所有路径 测试地址:https://leetcode-cn.com/problems/binary-tree-paths/

235、各位相加 测试地址:https://leetcode-cn.com/problems/add-digits/

236、只出现一次的数字3 测试地址:https://leetcode-cn.com/problems/single-number-iii/

237、丑数 测试地址:https://leetcode-cn.com/problems/ugly-number/

238、丑数2 测试地址:https://leetcode-cn.com/problems/ugly-number-ii/

239、缺失数字 测试地址:https://leetcode-cn.com/problems/missing-number/

240、正数转换英文表示 测试地址:https://leetcode-cn.com/problems/integer-to-english-words/

241、H指数 测试地址:https://leetcode-cn.com/problems/h-index/

242、H指数2 测试地址:https://leetcode-cn.com/problems/h-index-ii/

243、第一个错误版本 测试地址:https://leetcode-cn.com/problems/first-bad-version/

244、完全平方数 测试地址:https://leetcode-cn.com/problems/perfect-squares/

245、给表达式添加运算符 测试地址:https://leetcode-cn.com/problems/expression-add-operators/

246、移动零 测试地址:https://leetcode-cn.com/problems/move-zeroes/

247、顶端迭代器 测试地址:https://leetcode-cn.com/problems/peeking-iterator/

About

记录LeetCode、牛客上各种算法题的解法,尽可能的对每道题实现多种解法,在过程中学习思路以及解题过程。使用Java和Python两种语言编写题解,力求得心应手。(本项目只包含题解代码,如有精彩的题目将同步更新题解说明文章到CSDN和知乎)

https://www.zhihu.com/people/dengbocong


Languages

Language:Java 88.4%Language:Python 11.6%