Skip to content
techinterview
Pruning [mp]
Search
techinterview
Home
Lessons
Terminology
Terminology
Rule of thumb [terminology]
a / b [terminology]
acc [terminology]
ans [terminology]
base [terminology]
best [terminology]
cand [terminology]
carry / partial [terminology]
cnt [terminology]
colors [terminology]
count / counts [terminology]
cur / prev / nxt [terminology]
digit [terminology]
dist [terminology]
dr / dc [terminology]
dummy [terminology]
freq / freqs [terminology]
front / back / next_front [terminology]
i / j / k [terminology]
idx [terminology]
int_part [terminology]
l / r [terminology]
letters / alphabet [terminology]
level / depth [terminology]
lo / hi [terminology]
m / n [terminology]
mask [terminology]
mid [terminology]
node [terminology]
nr / nc [terminology]
num_str [terminology]
original / ordered [terminology]
parts [terminology]
path [terminology]
pos [terminology]
prefix / suffix [terminology]
prev1 / prev2 [terminology]
profit / gain [terminology]
q [terminology]
r / c [terminology]
rem [terminology]
res [terminology]
rev [terminology]
romans [terminology]
root / head / tail [terminology]
seen [terminology]
slow / fast [terminology]
stack / heap [terminology]
start / end [terminology]
top / bottom / left / right [terminology]
total [terminology]
used [terminology]
val [terminology]
visited [terminology]
w / r [terminology]
width / size [terminology]
x [terminology]
Micro Pattern
Micro Pattern
Adjacency list [mp]
Augment basic data structure [mp]
Backtracking [mp]
Backward [mp]
BFS [mp]
Binary search [mp]
Bit-operations / bit-manipulations [mp]
BST [mp]
Bubbling [mp]
Buckets [mp]
Building digit by digit / base accumulation [mp]
Canonical representation / normalization [mp]
Carry propagation [mp]
Comparison [mp]
Condition ordering [mp]
Cycle detection / fix point [mp]
Deriving state from previous state [mp]
DFS [mp]
Digit manipulation [mp]
Division truncate toward zero [mp]
Dummy node [mp]
Duplicate [mp]
Dynamic programming [mp]
Frequency-count [mp]
Global marking [mp]
Graph coloring [mp]
Greedy [mp]
Grouping [mp]
Hash-map [mp]
Hash-map from value to index [mp]
Hash-set pattern [mp]
Heap [mp]
In-place [mp]
In-place marking [mp]
Iterative construction [mp]
Math formula / Math fact [mp]
Memoization [mp]
Minimal state [mp]
Miscelaneous [mp]
Multiset [mp]
Named algorithms [mp]
Negative numbers [mp]
Neighbors in a grid [mp]
One pass [mp]
Overflow detection [mp]
Overwrite node's value [mp]
Parsing [mp]
Partioning [mp]
Permutations [mp]
Pointer mutation [mp]
Positional comparison [mp]
Pruning [mp]
Pruning [mp]
On this page
Micro pattern
Problems
Queue [mp]
Recursion [mp]
Reverse [mp]
Reverse search [mp]
Right to left [mp]
Running state [mp]
Sliding window [mp]
Sort first (or already sorted) [mp]
Stack [mp]
State propagation [mp]
Stop early [mp]
Swaps [mp]
Transform [mp]
Tree traversal (inorder, preorder, etc.) [mp]
Two pointers [mp]
DSA
DSA
AVL trees
BFS and DFS
Binary Trees
Graphs
Hash Table Definition
Hash Table Implementation
Heap
N-ary Trees
Preorder, inorder, and postorder traversals
Sorting algorithms
Bottom-up merge sort
Bubble sort
Bucket sort
Counting sort
Heap sort
Insertion sort
LSD radix sort
Quick sort
Selection sort
Shell sort
Top-down merge sort
Trees and Graph cheatsheet
Tries
LeetCode Top Easy
LeetCode Top Easy
Feedback
Python Reference
Vocabulary
Variable names
Array
Array
26. Remove Duplicates from Sorted Array
122. Best Time to Buy and Sell Stock II
189. Rotate Array
217. Contains Duplicate
136. Single Number
350. Intersection of Two Arrays II
66. Plus One
283. Move Zeroes
1. Two Sum
36. Valid Sudoku
48. Rotate Image
Strings
Strings
344. Reverse String
7. Reverse Integer
387. First Unique Character in a String
242. Valid Anagram
125. Valid Palindrome
8. String to Integer (atoi)
28. Find the Index of the First Occurrence in a String
14. Longest Common Prefix
Linked list
Linked list
237. Delete Node in a Linked List
19. Remove Nth Node From End of List
206. Reverse Linked List
21. Merge Two Sorted Lists
234. Palindrome Linked List
141. Linked List Cycle
Trees
Trees
104. Maximum Depth of Binary Tree
98. Validate Binary Search Tree
101. Symmetric Tree
102. Binary Tree Level Order Traversal
108. Convert Sorted Array to Binary Search Tree
Sorting and Searching
Sorting and Searching
88. Merge Sorted Array
278. First Bad Version
Dynamic Programming
Dynamic Programming
70. Climbing Stairs
121. Best Time to Buy and Sell Stock
53. Maximum Subarray
198. House Robber
Design
Design
384. Shuffle an Array
155. Min Stack
Math
Math
412. Fizz Buzz
204. Count Primes
326. Power of Three
13. Roman to Integer
Others
Others
191. Number of Bits
461. Hamming Distance
190. Reverse Bits
118. Pascal's Triangle
20. Valid Parentheses
268. Missing Number
LeetCode Top Medium
LeetCode Top Medium
Python Reference
Array and Strings
Array and Strings
15. 3Sum
73. Set Matrix Zeroes
49. Group Anagrams
3. Longest Substring Without Repeating Characters
5. Longest Palindromic Substring
334. Increasing Triplet Subsequence
38. Count and Say
Linked List
Linked List
2. Add Two Numbers
328. Odd Even Linked List
160. Intersection of Two Linked Lists
Trees and Graphs
Trees and Graphs
94. Binary Tree Inorder Traversal
103. Binary Tree Zigzag Level Order Traversal
105. Construct Binary Tree from Preorder and Inorder Traversal
116. Populating Next Right Pointers in Each Node
230. Kth Smallest Element in a BST
200. Number of Islands
Backtracking
Backtracking
17. Letter Combinations of a Phone Number
22. Generate Parentheses
46. Permutations
78. Subsets
79. Word Search
Sorting and Searching
Sorting and Searching
75. Sort Colors
347. Top K Frequent Elements
215. Kth Largest Element in an Array
162. Find Peak Element
56. Merge Intervals
33. Search in Rotated Sorted Array
240. Search a 2D Matrix II
Dynamic Programming
Dynamic Programming
55. Jump Game
62. Unique Paths
322. Coin Change
300. Longest Increasing Subsequence
Design
Design
295. Serialize and Deserialize Binary Tree
380. Insert Delete GetRandom O(1)
Math
Math
202. Happy Number
172. Factorial Trailing Zeroes
171. Excel Sheet Column Number
50. Pow(x, n)
69. Sqrt(x)
29. Divide Two Integers
166. Fraction to Recurring Decimal
Others
Others
371. Sum of Two Integers
150. Evaluate Reverse Polish Notation
169. Majority Element
621. Task Scheduler
LeetCode Top Hard
LeetCode Top Hard
Array and Strings
Array and Strings
238. Product of Array Except Self
54. Spiral Matrix
454. 4Sum II
Linked List
Linked List
23. Merge k Sorted Lists
148. Sort List
138. Copy List with Random Pointer
Trees and Graphs
Trees and Graphs
127. Word Ladder
130. Surrounded Regions
Backtracking
Backtracking
131. Palindrome Partitioning
212. Word Search II
Sorting and Searching
Sorting and Searching
324. Wiggle Sort II
378. Kth Smallest Element in a Sorted Matrix
Dynamic Programming
Dynamic Programming
152. Maximum Product Subarray
91. Decode Ways
Design
Design
146. LRU Cache
341. Flatten Nested List Iterator
Math
Math
179. Largest Number
149. Max Points on a Line
Others
Others
406. Queue Reconstruction by Height
42. Trapping Rain Water
LeetCode SQL 50
LeetCode SQL 50
SQL & Pandas Reference
SQL & Pandas Reference
Select, rename, filter, NULLs, sort, limit
Joins, self-joins, cross joins, semi-joins, anti-joins
Dates and date arithmetic
Grouping, aggregation, HAVING, and counting zero matches
Conditional logic, conditional aggregation, ratios, and rounding
CTEs, subqueries, set operations, and relational division
Window functions, ranking, first row, top rows, and nth values
Previous rows, next rows, consecutive patterns, running totals, and rolling windows
Latest row before a cutoff and default fallback values
Strings, formatting, matching, regex, and string aggregation
Duplicates and delete patterns
Modulo, parity, and swapping adjacent rows
Final projection and Pandas cleanup
Select
Select
1757. Recyclable and Low Fat Products
584. Find Customer Referee
595. Big Countries
1148. Article Views I
1683. Invalid Tweets
Basic Joins
Basic Joins
1378. Replace Employee ID With The Unique Identifier
1068. Product Sales Analysis I
1581. Customer Who Visited but Did Not Make Any Transactions
197. Rising Temperature
1661. Average Time of Process per Machine
577. Employee Bonus
1280. Students and Examinations
570. Managers with at Least 5 Direct Reports
1934. Confirmation Rate
Basic Aggregate Functions
Basic Aggregate Functions
620. Not Boring Movies
1251. Average Selling Price
1075. Project Employees I
1633. Percentage of Users Attended a Contest
1211. Queries Quality and Percentage
1193. Monthly Transactions I
1174. Immediate Food Delivery II
Sorting and Grouping
Sorting and Grouping
2356. Number of Unique Subjects Taught by Each Teacher
1141. User Activity for the Past 30 Days I
1070. Product Sales Analysis III
596. Classes With at Least 5 Students
1729. Find Followers Count
619. Biggest Single Number
Advanced Select and Joins
Advanced String Functions / Regex / Clause
Advanced String Functions / Regex / Clause
1667. Fix Names in a Table
Subqueries
Subqueries
1978. Employees Whose Manager Left the Company
626. Exchange Seats
1341. Movie Rating
1321. Restaurant Growth
602. Friend Requests II: Who Has the Most Friends
585. Investments in 2016
Prep Google Interview
Prep Google Interview
Interview
Python Reference
LeetCode Problems
LeetCode Problems
669. Trim a Binary Search Tree
445. Add Two Numbers II
1079. Letter Tile Possibilities
1042. Flower Planting With No Adjacent
1002. Find Common Characters
1221. Split a String in Balanced Strings
290. Word Pattern
542. 01 Matrix
35. Search Insert Position
547. Number of Provinces
796. Rotate String
229. Majority Element II
404. Sum of Left Leaves
746. Min Cost Climbing Stairs
292. Nim Game
929. Unique Email Addresses
904. Fruit Into Baskets
On this page
Micro pattern
Problems
Home
Micro Pattern
Pruning [mp]
Micro pattern
¶
Problems
¶
22. Generate Parentheses
(Top Medium)
Back to top