Skip to content

Xinghui-Wu/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode

This repository documents my LeetCode journey for the practice of data structures and algorithms.

Math

Problem
2. Add Two Numbers
7. Reverse Integer
9. Palindrome Number
13. Roman to Integer
66. Plus One
67. Add Binary
69. Sqrt(x)
150. Evaluate Reverse Polish Notation
168. Excel Sheet Column Title
171. Excel Sheet Column Number
190. Reverse Bits
191. Number of 1 Bits
202. Happy Number
279. Perfect Squares
343. Integer Break
371. Sum of Two Integers
415. Add Strings
509. Fibonacci Number
738. Monotone Increasing Digits

Linear List

Array

Problem
1. Two Sum
4. Median of Two Sorted Arrays
15. 3Sum
18. 4Sum
26. Remove Duplicates from Sorted Array
27. Remove Element
31. Next Permutation
33. Search in Rotated Sorted Array
34. Find First and Last Position of Element in Sorted Array
35. Search Insert Position
37. Sudoku Solver
39. Combination Sum
40. Combination Sum II
41. First Missing Positive
42. Trapping Rain Water
45. Jump Game II
46. Permutations
47. Permutations II
51. N-Queens
52. N-Queens II
53. Maximum Subarray
54. Spiral Matrix
55. Jump Game
56. Merge Intervals
59. Spiral Matrix II
66. Plus One
77. Combinations
78. Subsets
88. Merge Sorted Array
90. Subsets II
118. Pascal's Triangle
119. Pascal's Triangle II
121. Best Time to Buy and Sell Stock
122. Best Time to Buy and Sell Stock II
123. Best Time to Buy and Sell Stock III
134. Gas Station
135. Candy
136. Single Number
137. Single Number II
150. Evaluate Reverse Polish Notation
162. Find Peak Element
167. Two Sum II - Input Array Is Sorted
169. Majority Element
188. Best Time to Buy and Sell Stock IV
198. House Robber
200. Number of Islands
209. Minimum Size Subarray Sum
213. House Robber II
215. Kth Largest Element in an Array
216. Combination Sum III
221. Maximal Square
239. Sliding Window Maximum
260. Single Number III
287. Find the Duplicate Number
300. Longest Increasing Subsequence
309. Best Time to Buy and Sell Stock with Cooldown
322. Coin Change
349. Intersection of Two Arrays
376. Wiggle Subsequence
377. Combination Sum IV
406. Queue Reconstruction by Height
416. Partition Equal Subset Sum
435. Non-overlapping Intervals
452. Minimum Number of Arrows to Burst Balloons
454. 4Sum II
455. Assign Cookies
474. Ones and Zeroes
491. Increasing Subsequences
494. Target Sum
518. Coin Change 2
674. Longest Continuous Increasing Subsequence
704. Binary Search
714. Best Time to Buy and Sell Stock with Transaction Fee
718. Maximum Length of Repeated Subarray
746. Min Cost Climbing Stairs
860. Lemonade Change
977. Squares of a Sorted Array
1005. Maximize Sum Of Array After K Negations
1035. Uncrossed Lines
1049. Last Stone Weight II

Linked List

Problem
2. Add Two Numbers
19. Remove Nth Node From End of List
21. Merge Two Sorted Lists
23. Merge k Sorted Lists
24. Swap Nodes in Pairs
25. Reverse Nodes in k-Group
82. Remove Duplicates from Sorted List II
83. Remove Duplicates from Sorted List
92. Reverse Linked List II
141. Linked List Cycle
142. Linked List Cycle II
143. Reorder List
146. LRU Cache
148. Sort List
160. Intersection of Two Linked Lists
203. Remove Linked List Elements
206. Reverse Linked List
234. Palindrome Linked List
237. Delete Node in a Linked List
328. Odd Even Linked List
876. Middle of the Linked List

Stack/Queue

Problem
20. Valid Parentheses
32. Longest Valid Parentheses
42. Trapping Rain Water
71. Simplify Path
150. Evaluate Reverse Polish Notation
239. Sliding Window Maximum
347. Top K Frequent Elements
1047. Remove All Adjacent Duplicates In String

String

Problem
3. Longest Substring Without Repeating Characters
5. Longest Palindromic Substring
8. String to Integer (atoi)
13. Roman to Integer
14. Longest Common Prefix
17. Letter Combinations of a Phone Number
20. Valid Parentheses
22. Generate Parentheses
28. Implement strStr()
32. Longest Valid Parentheses
38. Count and Say
58. Length of Last Word
67. Add Binary
71. Simplify Path
72. Edit Distance
76. Minimum Window Substring
93. Restore IP Addresses
115. Distinct Subsequences
125. Valid Palindrome
131. Palindrome Partitioning
139. Word Break
151. Reverse Words in a String
168. Excel Sheet Column Title
171. Excel Sheet Column Number
179. Largest Number
242. Valid Anagram
344. Reverse String
383. Ransom Note
387. First Unique Character in a String
392. Is Subsequence
415. Add Strings
459. Repeated Substring Pattern
474. Ones and Zeroes
516. Longest Palindromic Subsequence
541. Reverse String II
583. Delete Operation for Two Strings
647. Palindromic Substrings
763. Partition Labels
1047. Remove All Adjacent Duplicates In String
1143. Longest Common Subsequence

Hash Table

Problem
1. Two Sum
3. Longest Substring Without Repeating Characters
13. Roman to Integer
146. LRU Cache
202. Happy Number
242. Valid Anagram
349. Intersection of Two Arrays
383. Ransom Note
454. 4Sum II

Tree

Problem
94. Binary Tree Inorder Traversal
96. Unique Binary Search Trees
98. Validate Binary Search Tree
100. Same Tree
101. Symmetric Tree
102. Binary Tree Level Order Traversal
103. Binary Tree Zigzag Level Order Traversal
104. Maximum Depth of Binary Tree
105. Construct Binary Tree from Preorder and Inorder Traversal
106. Construct Binary Tree from Inorder and Postorder Traversal
107. Binary Tree Level Order Traversal II
108. Convert Sorted Array to Binary Search Tree
110. Balanced Binary Tree
111. Minimum Depth of Binary Tree
112. Path Sum
113. Path Sum II
124. Binary Tree Maximum Path Sum
129. Sum Root to Leaf Numbers
144. Binary Tree Preorder Traversal
145. Binary Tree Postorder Traversal
199. Binary Tree Right Side View
222. Count Complete Tree Nodes
226. Invert Binary Tree
230. Kth Smallest Element in a BST
235. Lowest Common Ancestor of a Binary Search Tree
236. Lowest Common Ancestor of a Binary Tree
257. Binary Tree Paths
337. House Robber III
404. Sum of Left Leaves
437. Path Sum III
450. Delete Node in a BST
501. Find Mode in Binary Search Tree
513. Find Bottom Left Tree Value
530. Minimum Absolute Difference in BST
538. Convert BST to Greater Tree
617. Merge Two Binary Trees
654. Maximum Binary Tree
662. Maximum Width of Binary Tree
669. Trim a Binary Search Tree
700. Search in a Binary Search Tree
701. Insert into a Binary Search Tree
783. Minimum Distance Between BST Nodes
968. Binary Tree Cameras
1038. Binary Search Tree to Greater Sum Tree

Graph

Problem
200. Number of Islands
332. Reconstruct Itinerary

Backtracking

Problem
17. Letter Combinations of a Phone Number
22. Generate Parentheses
37. Sudoku Solver
39. Combination Sum
40. Combination Sum II
46. Permutations
47. Permutations II
51. N-Queens
52. N-Queens II
77. Combinations
78. Subsets
90. Subsets II
93. Restore IP Addresses
113. Path Sum II
131. Palindrome Partitioning
216. Combination Sum III
257. Binary Tree Paths
332. Reconstruct Itinerary
491. Increasing Subsequences
494. Target Sum

Dynamic Programming

Problem
5. Longest Palindromic Substring
22. Generate Parentheses
32. Longest Valid Parentheses
42. Trapping Rain Water
45. Jump Game II
53. Maximum Subarray
55. Jump Game
62. Unique Paths
63. Unique Paths II
70. Climbing Stairs
72. Edit Distance
96. Unique Binary Search Trees
115. Distinct Subsequences
121. Best Time to Buy and Sell Stock
122. Best Time to Buy and Sell Stock II
123. Best Time to Buy and Sell Stock III
124. Binary Tree Maximum Path Sum
131. Palindrome Partitioning
139. Word Break
188. Best Time to Buy and Sell Stock IV
198. House Robber
213. House Robber II
221. Maximal Square
279. Perfect Squares
300. Longest Increasing Subsequence
309. Best Time to Buy and Sell Stock with Cooldown
322. Coin Change
337. House Robber III
343. Integer Break
377. Combination Sum IV
392. Is Subsequence
416. Partition Equal Subset Sum
474. Ones and Zeroes
494. Target Sum
509. Fibonacci Number
516. Longest Palindromic Subsequence
518. Coin Change 2
583. Delete Operation for Two Strings
647. Palindromic Substrings
674. Longest Continuous Increasing Subsequence
714. Best Time to Buy and Sell Stock with Transaction Fee
718. Maximum Length of Repeated Subarray
746. Min Cost Climbing Stairs
968. Binary Tree Cameras
1035. Uncrossed Lines
1049. Last Stone Weight II
1143. Longest Common Subsequence

Greedy

Problem
45. Jump Game II
55. Jump Game
122. Best Time to Buy and Sell Stock II
134. Gas Station
135. Candy
179. Largest Number
376. Wiggle Subsequence
406. Queue Reconstruction by Height
435. Non-overlapping Intervals
452. Minimum Number of Arrows to Burst Balloons
455. Assign Cookies
738. Monotone Increasing Digits
763. Partition Labels
860. Lemonade Change
968. Binary Tree Cameras
1005. Maximize Sum Of Array After K Negations

Releases

No releases published

Packages

No packages published