Skip to content

zdRan/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

src目录结构说明

  1. extend:扩展包,题目中需要的一些扩展类,例如链表题目的节点类等。
  2. mains:Main 方法测试类,所有题目的测试入口类。可以直接运行。(从28题之后所有的测试代码都在submissions下)
  3. problems:题目说明类,包含解题的一些思路和需要注意的一些测试数据。(78题之后的思路都写在了代码里)
  4. submissions:提交的代码,解题的具体实现在这个包下。
  5. utils:工具类,一些测试用到的工具类,例如打印数组等。
  6. test:用于测试一些API。

刷不动了,开始按标签刷

# 思路 代码 难度
面试题 04.03 特定深度节点链表 Java Medium
589 N叉树的前序遍历 Java Easy
剑指 Offer 32 - II 从上到下打印二叉树 II Java Easy
654 最大二叉树 Java Medium
998 最大二叉树 II Java Medium
897 递增顺序查找树 Java Easy
剑指 Offer 54 二叉搜索树的第k大节点 Java Easy
1530 好叶子节点对的数量 Java Medium
222 完全二叉树的节点个数 Java Medium
剑指 Offer 26 树的子结构 Java Medium
剑指 Offer 55 - II 平衡二叉树 Java Easy
814 二叉树剪枝 Java Medium
面试题 04.05 合法二叉搜索树 Java Medium
865 具有所有最深节点的最小子树 Java Medium
面试题 04.12 求和路径 Java Medium
1022 从根到叶的二进制数之和 Java Easy
1110 删点成林 Java Medium
606 根据二叉树创建字符串 Java Easy
剑指 Offer 28 对称的二叉树 Java Easy
297 二叉树的序列化与反序列化 Java Hard
617 合并二叉树 Java Easy
1123 最深叶节点的最近公共祖先 Java Medium
剑指 Offer 55 - I 二叉树的深度 Java Easy
199 二叉树的右视图 Java Medium
1339 分裂二叉树的最大乘积 Java Medium
144 二叉树的前序遍历 Java Medium
1372 二叉树中的最长交错路径 Java Medium
226 翻转二叉树 Java Easy
剑指 Offer 68 - I 二叉搜索树的最近公共祖先 Java Easy
919 完全二叉树插入器 Java Medium
1145 二叉树着色游戏 Java Medium
235 二叉搜索树的最近公共祖先 Java Easy
701 二叉搜索树中的插入操作 Java Medium
1457 二叉树中的伪回文路径 Java Medium
145 二叉树的后序遍历 Java Medium
236 二叉树的最近公共祖先 Java Medium
257 二叉树的所有路径 Java Easy
230 二叉搜索树中第K小的元素 Java Medium
337 打家劫舍 III Java Medium
341 扁平化嵌套列表迭代器 Java Medium
404 左叶子之和 Java Easy
437 路径总和 III Java Medium
449 序列化和反序列化二叉搜索树 Java Medium

题目目录

# 思路 代码 难度
867 转置矩阵 Java Easy
448 找到所有数组中消失的数字 Java Easy
131 分割回文串 Java Medium
130 被围绕的区域 Java Medium
129 求根到叶子节点数字之和 Java Medium
128 最长连续序列 Java Hard
127 Word Ladder Java Medium
126 Word Ladder II 放弃 Hard
125 Valid Palindrome Java Easy
124 Binary Tree Maximum Path Sum Java Hard
123 Best Time to Buy and Sell Stock III Java Hard
122 Best Time to Buy and Sell Stock II Java Easy
121 Best Time to Buy and Sell Stock Java Easy
120 Triangle Java Medium
119 Pascal's Triangle II Java Easy
118 Pascal's Triangle Java Easy
117 Populating Next Right Pointers in Each Node II Java Medium
116 Populating Next Right Pointers in Each Node Java Medium
115 Distinct Subsequences Java Hard
114 Flatten Binary Tree to Linked List Java Medium
113 Path Sum II Java Medium
112 Path Sum Java Easy
111 Minimum Depth of Binary Tree Java Easy
110 Balanced Binary Tree Java Easy
109 Convert Sorted List to Binary Search Tree Java Medium
108 Convert Sorted Array to Binary Search Tree Java Easy
107 Binary Tree Level Order Traversal II Java Easy
106 Construct Binary Tree from Inorder and Postorder Traversal Java Medium
105 Construct Binary Tree from Preorder and Inorder Traversal Java Medium
104 Maximum Depth of Binary Tree Java Easy
103 Binary Tree Zigzag Level Order Traversal Java Medium
102 Binary Tree Level Order Traversal Java Medium
101 Symmetric Tree Java Easy
100 Same Tree Java Easy
99 Recover Binary Search Tree Java Hard
98 Validate Binary Search Tree Java Medium
97 Interleaving String Java Hard
96 Unique Binary Search Trees Java Medium
95 Unique Binary Search Trees II Java Medium
94 Binary Tree Inorder Traversal Java Medium
93 Restore IP Addresses Java Medium
92 Reverse Linked List II Java Medium
91 Decode Ways Java Medium
90 Subsets II Java Medium
89 Gray Code Java Medium
88 Merge Sorted Array Java Easy
87 Scramble String Java Hard
86 Partition List Java Medium
85 Maximal Rectangle Java Hard
84 Largest Rectangle in Histogram Java Hard
83 Remove Duplicates from Sorted List Java Easy
82 Remove Duplicates from Sorted List II Java Medium
81 Search in Rotated Sorted Array II Java Medium
80 Remove Duplicates from Sorted Array II Java Medium
79 Word Search Java Medium
78 Subsets Java Medium
77 Combinations Java Medium
76 Minimum Window Substring Java Hard
75 Sort Colors Java Medium
74 Search a 2D Matrix Java Medium
73 Set Matrix Zeroes Java Medium
72 Edit Distance Java MinimumWindow
71 Simplify Path Java Medium
70 Climbing Stairs Java Easy
69 Sqrt(x) Java 自带的函数库。不过效率不高 Easy
68 Text Justification Java Hard
67 Add Binary Java Hard
66 Plus One Java Easy
65 Valid Number Java Hard
64 Minimum Path Sum Java Medium
63 Unique Paths II Java Medium
62 Unique Paths Java Medium
61 Rotate List Java Medium
60 Permutation Sequence Java Medium
59 Spiral Matrix II Java Medium
58 Length of Last Word Java Easy
57 Insert Interval Java Hard
56 Merge Intervals Java Medium
55 Jump Game Java Medium
54 Spiral Matrix Java Medium
53 Maximum Subarray Java Medium
52 N-Queens II Java Hard
51 N-Queens Java Hard
50 Pow(x, n) Java Medium
49 Group Anagrams Java Medium
48 Rotate Image Java Medium
47 PermutationsII Java Medium
46 Permutations Java Medium
45 JumpGame Java Hard
44 WildcardMatching Java Hard
43 Multiply strings Java Medium
42 Trapping Rain Water Java Hard
41 First missing positive Java Hard
40 Combination Sum II Java Medium
39 Combination Sum Java Medium
38 Count and Say Java Easy
37 Sudoku Solver Java Hard
36 Valid Sudoku Java Medium
35 Search Insert Position Java Easy
34 Search for a Range Java Medium
33 Search in Rotated Sorted Array Java Medium
32 Longest Valid Parentheses Java Hard
31 Next Permutation Java Medium
30 Substring with Concatenation of All Words Java Hard
29 Divide Two Integers Java Medium
28 Implement strStr() Java Easy
27 Remove Element Java Easy
26 Remove Duplicates from Sorted Array Java Easy
25 Reverse Nodes in k-Group Java Hard
24 Swap Nodes in Pairs Java Medium
23 Merge k Sorted Lists Java Hard
22 Generate Parentheses Java Medium
21 Merge Two Sorted Lists Java Easy
20 Valid Parentheses Java Easy
19 Remove Nth Node From End of List Java Medium
18 4Sum Java Medium
17 Letter Combinations of a Phone Number Java Medium
16 3Sum Closest Java Medium
15 3Sum Java Medium
14 Longest Common Prefix Java Easy
13 Roman to Integer Java Easy
12 Integer to Roman Java Medium
11 Container With Most Water Java Medium
10 Regular Expression Matching Java Hard
9 Palindrome Number Java Easy
8 String to Integer (atoi) Java Medium
7 Reverse Integer Java Easy
6 ZigZag Conversion Java Medium
5 Longest palindromic substring Java Medium
4 Median of Two Sorted Arrays Java Hard
3 Longest Substring Without Repeating Characters Java Medium
2 Add Two Numbers Java Medium
1 Two sum Java Easy

About

leetcode上的算法题Java解析

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages