Skip to content
Eve
1307 Verbal Arithmetic Puzzle
Initializing search
Everoot
Home
Algorithms
Architecture
Database
OS
Network
Tools
Projects
Blog
Eve
Everoot
Home
Algorithms
Algorithms
Data Structures
Data Structures
Array
CS61B
Leetcode
Leetcode
LeetCode Tags
Aha Moment
Problem List
Problem List
130. Surrounded Regions
681. Next Closest Time
1 Longest Ascending Subsequence (Lai)
1. Two Sum ✅
10 Quick Sort (Lai)
10. Regular Expression Matching
100. Same Tree
101 Symmetric Tree
102 Binary Tree Level Order Traversal
102 Largest Rectangle Of 1s (Lai)
102. Binary Tree Level Order Traversal
1026 Maximum Difference Between Node and Ancestor
103 Binary Tree Zigzag Level Order Traversal
103 Longest Consecutive 1s (Lai)
104. Maximum Depth of Binary Tree
✅ 1046. Last Stone Weight
1047 Remove All Adjacent Duplicates In String
105 Largest X Of 1s (Lai)
105. Construct Binary Tree from Preorder and Inorder Traversal
106 Construct Binary Tree from Inorder and Postorder Traversal
106 Largest SubMatrix Sum (Lai)
1062. Longest Repeating Substring
1099 Two Sum Less Than K
11. Container With Most Water
110. Balanced Binary Tree
1100 Find K-Length Substrings With No Repeated Characters
111 Minimum Depth of Binary Tree
112 Path Sum
1123. Lowest Common Ancestor of Deepest Leaves
113 Path Sum II
1139 Largest 1-Bordered Square
114 Flatten Binary Tree to Linked List
1143. Longest Common Subsequence
115. Distinct Subsequences
1150. Check If a Number Is Majority Element in a Sorted Array
117 Array Deduplication III
118 Array Deduplication IV (Lai)
1185. Day of the Week
119 Largest And Smallest (Lai)
12. Integer to Roman
120 Largest And Second Largest (Lai)
121. Best Time to Buy and Sell Stock
124. Binary Tree Maximum Path Sum
125 Rotate Matrix (Lai)
125. Valid Palindrome
126 Lowest Common Ancestor I (Lai)
126 Word Ladder II
127 Lowest Common Ancestor II (Lai)
127. Word Ladder
128 Lowest Common Ancestor III (Lai)
128. Longest Consecutive Sequence
1287. Element Appearing More Than 25% In Sorted Array
129 Lowest Common Ancestor IV (Lai)
129 Sum Root to Leaf Numbers
1307 Verbal Arithmetic Puzzle
131 Deep Copy Linked List With Random Pointer (Lai)
131. Palindrome Partitioning131. Palindrome Partitioning
132 Deep Copy Undirected Graph (Lai)
132 Palindrome Partitioning II
133 Merge K Sorted Array (Lai)
133. Clone Graph
134 Merge K Sorted Lists (Lai)
134. Gas Station
135 Closest Number In Binary Search Tree (Lai)
136 Largest Number Smaller In Binary Search Tree (Lai)
136. Single Number
137 Cutting Wood I (Lai)
137. Single Number II
138 Maximum Path Sum Binary Tree I (Lai)
138. Copy List with Random Pointer
139. Word Break
1396. Design Underground System
14 Classical Binary Search (Lai)
140 Maximum Path Sum Binary Tree III (Lai)
141 Binary Tree Path Sum To Target III (Lai)
141. Linked List Cycle
143 Minimum Cuts For Palindromes (Lai)
143 Minimum Cuts For Palindromes
143. Reorder List
144 Binary Tree Preorder Traversal (recursive)
144 Binary Tree Preorder Traversal (recursive)
144 Binary Tree Preorder Traversal
1448. Count Good Nodes in Binary Tree
145 Binary Tree Postorder Traversal (iterative)
145 Binary Tree Postorder Traversal (recursive)
145 Binary Tree Postorder Traversal
146. LRU Cache
148 Sort List
149 Max Points on a Line
15 First Occurrence (Lai)
15. 3Sum
150. Evaluate Reverse Polish Notation
151 Reverse Words in a String
152. Maximum Product Subarray
1528 Shuffle String
1528 Shuffle String
153. Find Minimum in Rotated Sorted Array
155. Min Stack
156 Binary Tree Upside Down
157. Read N Characters Given Read4
158. Read N Characters Given read4 II - Call Multiple Times
1584. Min Cost to Connect All Points
159. Longest Substring with At Most Two Distinct Characters
16 Last Occurrence (Lai)
1603. Design Parking System
162. Find Peak Element
163. Missing Ranges
1644 Lowest Common Ancestor of a Binary Tree II
1644. Lowest Common Ancestor of a Binary Tree II
1650 Lowest Common Ancestor of a Binary Tree III
167. Two Sum II - Input Array Is Sorted
1676 Lowest Common Ancestor of a Binary Tree IV
1676. Lowest Common Ancestor of a Binary Tree IV
1679 Max Number of K-Sum Pairs
169. Majority Element
17 Closest In Sorted Array
17. Letter Combinations of a Phone Number
170 Two Sum III - Data structure design
171 Common Elements In Three Sorted Array (Lai)
1711 Count Good Meals
175. Combine Two Tables
1750. Minimum Length of String After Deleting Similar Ends
1757. Recyclable and Low Fat Products
176 Longest Common Substring (Lai)
177 Longest Common Subsequence (Lai)
179 All Valid Permutations Of Parentheses II (Lai)
18 4Sum
180 2 Sum (Lai)
181 2 Sum All Pair I (Lai)
181. Employees Earning More Than Their Managers
182 2 Sum All Pair II (Lai)
1832. Check if the Sentence Is Pangram
184. Department Highest Salary
1851. Minimum Interval to Include Each Query
186 3 Sum (Lai)
188 4 Sum (Lai)
1899. Merge Triplets to Form Target Triplet
19. Remove Nth Node From End of List ✅
190. Reverse Bits
191 Largest Product Of Length (Lai)
191. Number of 1 Bits
1910 Remove All Occurrences of a Substring
193 Kth Smallest With Only 3, 5, 7 As Factors (Lai)
194 Kth Closest Point To <0,0,0> (Lai)
197 ReOrder Array (Lai)
198 Largest Rectangle In Histogram (Lai)
198. House Robber
199 Max Water Trapped I (Lai)
199. Binary Tree Right Side View
2. Add Two Numbers
20. Valid Parentheses
200 Max Water Trapped II (Lai)
200. Number of Islands
2006 Count Number of Pairs With Absolute Difference K
2013. Detect Squares
202 Kth Smallest In Two Sorted Arrays (Lai)
202. Happy Number
203 Remove Linked List Elements
2035 Partition Array Into Two Arrays to Minimize Sum Difference
204 Maximum Values Of Size K Sliding Windows (Lai)
2040 Kth Smallest Product of Two Sorted Arrays
205 Implement LRU Cache (Lai)
206. Reverse Linked List ✅
207. Course Schedule
208. Implement Trie (Prefix Tree)
21. Merge Two Sorted Lists ✅
210. Course Schedule II
211 Reconstruct Binary Search Tree With Postorder Traversal (Lai)
211. Design Add and Search Words Data Structure
212. Word Search II
213 Reconstruct Binary Tree With Preorder And Inorder (Lai)
213. House Robber II
2148. Count Elements With Strictly Smaller and Greater Elements
215 Reconstruct Binary Tree With Levelorder And Inorder (Lai)
215. Kth Largest Element in an Array
216 Most Points On A Line (Lai)
217 Largest Set Of Points With Positive Slope (Lai)
217. Contains Duplicate ✅
219 Contains Duplicate II
22. Generate Parentheses
221 Maximal Square
222. Count Complete Tree Nodes
226. Invert Binary Tree
229 Majority Element II
23. Merge k Sorted Lists
230. Kth Smallest Element in a BST
2312 Selling Pieces of Wood
232 Implement Queue using Stacks
234 Palindrome Linked List
235. Lowest Common Ancestor of a Binary Search Tree
236 Lowest Common Ancestor of a Binary Tree
238. Product of Array Except Self ✅
239. Sliding Window Maximum
24 Swap Nodes in Pairs
240 Search a 2D Matrix II
242. Valid Anagram ✅
246. Strobogrammatic Number
247. Strobogrammatic Number II
2485. Find the Pivot Integer
25 K Smallest In Unsorted Array (Lai)
25. Reverse Nodes in k-Group
252. Meeting Rooms
253. Meeting Rooms II
254 Factor Combinations
2540. Minimum Common Value
255 Implement Stack using Queues
258 Move 0s To The End I (Lai)
258 Move 0s To The End I (Lai)
26 Kth Smallest Number In Sorted Matrix (Lai)
26 Remove Duplicates from Sorted Array
261. Graph Valid Tree
263 Two Subsets With Min Difference (Lai)
264 Keep Distance For Identical Elements (Lai)
2667. Create Hello World Function
268. Missing Number
269. Alien Dictionary
27 Kth Smallest Sum In Two Sorted Arrays (Lai)
270 Closest Binary Search Tree Value
271. Encode and Decode Strings
272 Closest Binary Search Tree Value II
273. Integer to English Words
276 Get Count Array (Lai)
278 Frist Bad Version
28 Find the Index of the First Occurrence in a String
280 Sort With 2 Stacks (Lai)
Remove Spaces (Lai)
283 Move Zeors
283 Move Zeroes
286. Walls and Gates
287. Find the Duplicate Number
288 First Non-Repeating Character In Stream (Lai)
295. Find Median from Data Stream
2956 Find Common Elements Between Two Arrays
297. Serialize and Deserialize Binary Tree
3. Longest Substring Without Repeating Characters
300. Longest Increasing Subsequence
3005. Count Elements With Maximum Frequency ✅
309. Best Time to Buy and Sell Stock with Cooldown
31. Next Permutation
312. Burst Balloons
315 Count of Smaller Numbers After Self
318 Maximum Product of Word Lengths
3213. Construct String with Minimum Cost
322. Coin Change
323. Number of Connected Components in an Undirected Graph
325 Heapify (Lai)
329. Longest Increasing Path in a Matrix
33. Search in Rotated Sorted Array
332. Reconstruct Itinerary
338. Counting Bits
34. Find First and Last Position of Element in Sorted Array
34 Reverse Linked List (iterative) (Lai)
343 Integer Break
344. Reverse String
347. Top K Frequent Elements
349. Intersection of Two Arrays
35. Search Insert Position
351. Android Unlock Patterns
355. Design Twitter
36. Valid Sudoku
363 Heap Offer Operation (Lai)
367 Heap Update Operation (Lai)
371. Sum of Two Integers
373 Find K Pairs with Smallest Sums
374 Guess Number Higher or Lower
375 Guess Number Higher or Lower II
378 Kth Smallest Element in a Sorted Matrix
387 First Unique Character in a String
39 Insert In Sorted Linked List (Lai)
39. Combination Sum
392 Is Subsequence
394. Decode String
395 Remove Certain Characters (Lai)
397 Right Shift By N Characters (Lai)
398 All Anagrams (Lai)
399. Evaluate Division
Selection Sort
4. Median of Two Sorted Arrays
40 Merge Two Sorted Linked Lists (Lai)
40. Combination Sum II
404 Sum of Left Leaves
407 Trapping Rain Water II
408 Valid Word Abbreviation
409. Longest Palindrome
41. First Missing Positive
414 Remove Linked List Elements (Lai)
416. Partition Equal Subset Sum
417. Pacific Atlantic Water Flow
42. Trapping Rain Water
424. Longest Repeating Character Replacement
425. Word Squares
43. Multiply Strings
430 Course Schedule II (Lai)
431 Word Search II (Lai)
435. Non-overlapping Intervals
437 Path Sum III
438 Find All Anagrams in a String
442. Find All Duplicates in an Array
443 String Compression
45. Jump Game II
450 Delete Node in a BST
46 Check If Binary Tree Is Balanced (Lai)
46 Permutations
46. Permutations
464 Can I Win
47 Check If Binary Tree Is Completed (Lai)
47 Permutations II
47 Permutations II
473 Matchsticks to Square
48. Rotate Image
482. License Key Formatting
485 Max Consecutive Ones
489. Robot Room Cleaner
49. Group Anagrams
494. Target Sum
496 Next Greater Element I
5. Longest Palindromic Substring
50. Pow(x, n)
503 Next Greater Element II
509 Fibonacci Number
509 Fibonacci Number
51. N-Queens
518. Coin Change II
52 N-Queens II
52 Search In Binary Search Tree (Lai)
523 Flatten Binary Tree to Linked List (Lai)
53 Delete In Binary Search Tree (Lai)
53. Maximum Subarray
54. Spiral Matrix
540 Single Element in a Sorted Array
543. Diameter of Binary Tree
547. Number of Provinces
55. Jump Game
556 Next Greater Element III
56 Bipartite (Lai)
56. Merge Intervals
560 Subarray Sum Equals K
562. Longest Line of Consecutive One in Matrix
567. Permutation in String
57. Insert Interval
572. Subtree of Another Tree
58 Length of Last Word
59 Spiral Matrix II
62. Unique Paths
621. Task Scheduler
63 All Subsets II (Lai)
636 Smallest Element Larger than Target (Lai)
638 Largest Square Of Matches (Lai)
638 Largest Square Of Matches
639 Max Path Sum From Leaf To Root (Lai)
64. Minimum Path Sum
640 All Subsets of Size K (Lai)
642 All Valid Permutations Of Parentheses III (Lai)
644 Common Elements In K Sorted Lists (Lai)
645 Deque By Three Stacks (Lai)
647 Lowest Common Ancestor V (Lai)
647. Palindromic Substrings
648 Lowest Common Ancestor VI (Lai)
649 String Replace (Lai)
65 All Permutations II (Lai)
65 Valid Number
650 Common Numbers Of Two Arrays I(Array version) (Lai)
651 Common Numbers Of Two Arrays II(Array version) (Lai)
652 Common Numbers Of Two Sorted Arrays(Array version) (Lai)
653 Two Sum IV - Input is a BST
655 Pre-order Traversal Of Binary Tree (recursive) (Lai)
657 Can I Win II (Lai)
658 Find K Closest Elements
66. Plus One
661 Word Ladder (Lai)
662 Word Ladder II (Lai)
665 Pacific Atlantic Flow (Lai)
666 Path Sum IV
67 Top K Frequent Words (Lai)
673 Number of Longest Increasing Subsequence
674 Longest Continuous Increasing Subsequence
678 Next Greater Number I (Lai)
678. Valid Parenthesis String
68 Missing Number I (Lai)
681 Seven Puzzle (Lai)
681. Next Closest Time
683 Count Ascending Subsequence
684. Redundant Connection
692 Top K Frequent Words
695. Max Area of Island
7. Reverse Integer
70. Climbing Stairs
700 Search in a Binary Search Tree
701 Insert into a Binary Search Tree
702 Search in a Sorted Array of Unknown Size
703. Kth Largest Element in a Stream
704. Binary Search
709 To Lower Case
713 Subarray Product Less Than K
72 Edit Distance
720. Longest Word in Dictionary
73 Combinations Of Coins (Lai)
73. Set Matrix Zeroes
739. Daily Temperatures
74. Search a 2D Matrix
743. Network Delay Time
744 Find Smallest Letter Greater Than Target
746. Min Cost Climbing Stairs
753. Cracking the Safe
76 All Unique Characters I (Lai)
76. Minimum Window Substring
763. Partition Labels
764 Largest Plus Sign
77 All Unique Characters II (Lai)
77 Combinations
773 Sliding Puzzle
778. Swim in Rising Water
78. Subsets
785 Is Graph Bipartite?
786 K-th Smallest Prime Fraction
787. Cheapest Flights Within K Stops
79 Remove Adjacent Repeated Characters I (Lai)
79. Word Search
796 Rotate String
8 String to Integer (atoi)
80 Remove Duplicates from Sorted Array II
809. Expressive Words
82 Remove Adjacent Repeated Characters IV (Lai)
82 Remove Adjacent Repeated Characters IV
833. Find And Replace in String
84. Largest Rectangle in Histogram
844. Backspace String Compare
846. Hand of Straights
849. Maximize Distance to Closest Person
85 Determine If One String Is Another's Substring (Lai)
85 Maximal Rectangle
853. Car Fleet
857. Minimum Cost to Hire K Workers
86 Longest Ascending SubArray
86 Partition List
87 Max Product Of Cutting Rope (Lai)
875. Koko Eating Bananas
876. Middle of the Linked List
88 Merge Sorted Array
885 Spiral Matrix III
9 Merge Sort (Lai)
90. Subsets II
904. Fruit Into Baskets
91. Decode Ways
912 Sort an Array (Merge Sort)
912 Sort an Array (Quick Sort)
929. Unique Email Addresses
930. Binary Subarrays With Sum
938 Range Sum of BST
94 Binary Tree Inorder Traversal (recursive)
94 Binary Tree Inorder Traversal (recursive)
947. Most Stones Removed with Same Row or Column
948. Bag of Tokens
951. Flip Equivalent Binary Trees
958 Check Completeness of a Binary Tree
97. Interleaving String
973. K Closest Points to Origin
975. Odd Even Jump
98. Validate Binary Search Tree
981. Time Based Key-Value Store
994. Rotting Oranges
Bitmask
Dynamic Programming
How integer number change to string?
L33 Search in Rotated Sorted Array
L35 Search Insert Position
L69 Sqrt(x)
Contest
Quantum
Quantum
Grover
QKD
Architecture
Database
OS
Network
Tools
Projects
Blog
1307 Verbal Arithmetic Puzzle
Back to top