Skip to content

yanguango/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# Title Solution Difficulty Analysis
306 Additive Number Java Medium
305 Number of Islands II Java Hard
304 Range Sum Query 2D - Immutable Java Medium
303 Range Sum Query - Immutable Java Easy
302 Smallest Rectangle Enclosing Black Pixels Java Medium
300 Longest Increasing Subsequence Java Medium
299 Bulls and Cows Java Easy
298 Binary Tree Longest Consecutive Sequence Java Medium
296 Best Meeting Point Java Hard
295 Find Median from Data Stream Java Hard
294 Flip Game 2 Java Medium
293 Flip Game Java Easy
292 Nim Game Java Easy
291 Word Pattern 2 Java Hard
290 Word Pattern Java Easy
289 Game of Life Java Easy
288 Unique Word Abbreviation Java Easy
287 Find the Duplicate Number Java Hard
286 Walls and Gates Java Medium
285 Inorder Successor in BST Java Medium
284 Peeking Iterator Java Medium
283 Move Zeros Java Easy
282 Expression Add Operators Java Hard
281 Zigzag Iterator Java Medium
280 Wiggle Sort Java Medium
279 Perfect Squares Java Medium
278 First Bad Version Java Easy Link
277 Find the Celebrity Java Medium Link
276 Paint Fence Java Medium
274 H-Index Java Medium
273 Integer to English Words Java Medium
272 Closest Binary Search Tree Value II Java Hard
271 Encode and Decode Strings Java Medium
270 Closest Binary Search Tree Value Java Easy
268 Missing Number Java Medium
266 Palindrome Permutation Java Easy
264 Ugly Number 2 Java Medium
263 Ugly Number Java Easy
261 Graph Valid Tree Java Medium
259 3 Sum Smaller Java Medium
258 Add Digits Easy
257 Binary Tree Paths Java Easy
255 Verify Preorder Sequence in Binary Search Tree Java Medium
253 Meeting Rooms 2 Java Medium
252 Meeting Rooms Java Easy
251 Flatten 2D Vector Java Medium
250 Count Univalue Subtrees Java Medium
249 Group Shiftd Strings Java Easy
247 Strobogrammatic Number 2 Java Medium
246 Strobogrammatic Number Java Easy
242 Valid Anagram Java Easy
241 Different Ways to Add Parentheses Medium
240 Search a 2D Matrix II Java Medium
239 Sliding Window Maximum Hard
238 Product of Array Except Self Java Medium
237 Delete Node in a Linked List Java Easy
236 Lowest Common Ancestor of a Binary Tree Java Medium
235 Lowest Common Ancestor of a Binary Search Tree Java Easy
234 Palindrome Linked List Java Easy
233 Number of Digit One Medium
232 Implement Queue using Stacks Java Easy
231 Power of Two Java Easy
230 Kth Smallest Element in a BST Java Medium
229 Majority Element II Java Medium
228 Summary Ranges Java Easy
227 Basic Calculator II Java Medium
226 Invert Binary Tree Java Easy
225 Implement Queue using Stacks Java Easy
224 Basic Calculator Java Medium
223 Rectangle Area Java Easy
222 Count Complete Tree Nodes Java Medium
221 Maximal Square Java Medium
220 Contains Duplicate III Medium
219 Contains Duplicate II Easy
218 The Skyline Problem Java Hard
217 Contains Duplicate Easy
216 Combination Sum III Medium
215 Kth Largest Element in an Array Medium
214 Shortest Palindrome Java Hard
213 House Robber II Medium
212 Word Search II Java Hard
211 Add and Search Word - Data structure design Java Medium
210 Course Schedule II Medium
209 Minimum Size Subarray Sum Java Medium
208 Implement Trie (Prefix Tree) Java Medium
207 Course Schedule Medium
206 Reverse Linked List Java Easy
205 Isomorphic Strings Java Easy
204 Count Primes Java Easy
203 Remove Linked List Elements Java Easy
202 Happy Number Java Easy
200 Number of Islands Java Medium
199 Binary Tree Right Side View Java Medium
198 House Robber Java Easy
191 Number of 1 Bits Java Easy
186 Reverse Words in a String II Java Medium
185 Bitwise AND of Numbers Range Medium
184 Number of Islands Medium
183 Binary Tree Right Side View Medium
182 House Robber Easy
181 Number of 1 Bits Easy
180 Reverse Bits Easy
179 Rotate Array Easy
178 Best Time to Buy and Sell Stock IV Hard
177 Repeated DNA Sequences Java Medium
176 Reverse Words in a String II Medium
175 Largest Number Medium
174 Dungeon Game Hard
173 Binary Search Tree Iterator Java Medium
172 Factorial Trailing Zeroes Java Easy
171 Excel Sheet Column Number Java Easy
170 Two Sum III - Data structure design Easy
169 Majority Element Java Easy
168 Excel Sheet Column Title Java Easy
167 Two Sum II - Input array is sorted Java Medium
166 Fraction to Recurring Decimal Java Medium
165 Compare Version Numbers Java Easy
164 Maximum Gap Hard
163 Missing Ranges Java Medium
162 Find Peak Element Java Medium
161 One Edit Distance Java Medium
160 Intersection of Two Linked Lists Java Easy
159 Longest Substring with At Most Two Distinct Characters Java Hard
158 Read N Characters Given Read4 II - Call multiple times Java Hard
157 Read N Characters Given Read4 Java Easy
156 Binary Tree Upside Down Java Medium
155 Min Stack Java Easy
154 Find Minimum in Rotated Sorted Array II Java Hard
153 Find Minimum in Rotated Sorted Array Java Medium
152 Maximum Product Subarray Java Medium
151 Reverse Words in a String Java Medium
150 Evaluate Reverse Polish Notation Java Medium
149 Max Points on a Line Hard
148 Sort List Medium
147 Insertion Sort List Java Medium
146 LRU Cache Java Hard
145 Binary Tree Postorder Traversal Hard
144 Binary Tree Preorder Traversal Java Medium
143 Reorder List Medium
142 Linked List Cycle II Java Medium
141 Linked List Cycle Java Medium
140 Word Break II Java Hard
139 Word Break Java Medium
138 Copy List with Random Pointer Hard
137 Single Number II Medium
136 Single Number Java Medium
135 Candy Hard
134 Gas Station Medium
133 Clone Graph Medium
132 Palindrome Partitioning II Java Hard
131 Palindrome Partitioning Java Medium
130 Surrounded Regions Medium
129 Sum Root to Leaf Numbers Medium
128 Longest Consecutive Sequence Java Hard
127 Word Ladder II Hard
126 Word Ladder Medium
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 Medium
121 Best Time to Buy and Sell Stock Java Medium
120 Triangle Java Medium
119 Pascal's Triangle II Easy
118 Pascal's Triangle Easy
117 Populating Next Right Pointers in Each Node II Java Hard
116 Populating Next Right Pointers in Each Node Java Medium
115 Distinct Subsequences 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 Medium
108 Convert Sorted Array to Binary Search Tree Java Medium
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 Easy
101 Symmetric Tree Java Easy
100 Same Tree Java Easy
99 Recover Binary Search Tree Hard
98 Validate Binary Search Tree Medium
97 Interleaving String 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 Subsets II Java Medium
90 Decode Ways Medium
89 Gray Code Java Medium
88 Merge Sorted Array Easy
87 Scramble String Hard
86 Partition List Java Medium
85 Maximal Rectangle Java Hard
84 Largest Rectangle in Histogram Java Hard
82 Remove Duplicates from Sorted List II Java Medium
83 Remove Duplicates from Sorted List Java Easy
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 Medium
76 Minimum Window Substring Hard
75 Sort Colors Java Medium
74 Search a 2D Matrix Java Medium
73 Set Matrix Zeroes Java Medium
72 Edit Distance Hard
71 Simplify Path Java Medium
70 Climbing Stairs Java Easy
69 Sqrt(x) Java Medium
68 Text Justification Hard
67 Add Binary Java Easy
66 Plus One Java Easy
65 Valid Number Easy
64 Minimum Path Sum Medium
63 Unique Paths II Medium
62 Unique Paths 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 Hard
55 Jump Game Java Medium
54 Spiral Matrix Java Medium
53 Maximum Subarray Java Medium
52 N-Queens II Hard
51 N-Queens Hard
50 "Pow(x, n)" Java Medium
49 Group Anagrams Java Medium
48 Rotate Image Java Medium
47 Permutations II Hard
46 Permutations Medium
45 Jump Game II Java Hard
44 Wildcard Matching Java Hard
43 Multiply Strings Java Medium
42 Trapping Rain Water Java Hard
41 First Missing Positive Java Hard
40 Combination Sum II Medium
39 Combination Sum Medium
38 Count and Say Java Easy
37 Sudoku Solver Hard
36 Valid Sudoku Java Easy
35 Search Insert Position Medium
34 Search for a Range Java Medium
33 Search in Rotated Sorted Array Java Hard
32 Longest Valid Parentheses Hard
31 Next Permutation Java Medium
30 Substring with Concatenation of All Words Hard
29 Divide Two Integers 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 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 Easy
18 4Sum Medium
17 Letter Combinations of a Phone Number Medium
16 3Sum Closest Medium
15 3Sum Java Medium
14 Longest Common Prefix Java Easy
13 Roman to Integer Java Easy
12 Integer to Roman 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 Easy
7 Reverse Integer Java Easy
6 ZigZag Conversion Java Easy
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 Medium

About

✌️ My leetcode solutions in Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages