427 |
Construct Quad Tree |
|
|
558 |
Logical OR of Two Binary Grids Represented as Quad-Trees |
|
|
1265 |
Print Immutable Linked List in Reverse |
|
|
1506 |
Find Root of N-Ary Tree |
|
|
1522 |
Diameter of N-Ary Tree |
|
|
702 |
Search in a Sorted Array of Unknown Size |
binary-search |
|
1236 |
Web Crawler |
depth-first-search breadth-first-search |
|
133 |
Clone Graph |
depth-first-search breadth-first-search graph |
|
284 |
Peeking Iterator |
design |
|
673 |
Number of Longest Increasing Subsequence |
dynamic-programming |
|
138 |
Copy List with Random Pointer |
hash-table linked-list |
|
1612 |
Check If Two Expression Trees are Equivalent |
hash-table tree |
|
1485 |
Clone Binary Tree With Random Pointer |
hash-table tree depth-first-search breadth-first-search |
|
1490 |
Clone N-ary Tree |
hash-table tree depth-first-search breadth-first-search |
|
708 |
Insert into a Sorted Circular Linked List |
linked-list |
|
1634 |
Add Two Polynomials Represented as Linked Lists |
linked-list |
|
430 |
Flatten a Multilevel Doubly Linked List |
linked-list depth-first-search |
|
426 |
Convert Binary Search Tree to Sorted Doubly Linked List |
linked-list divide-and-conquer tree |
|
142 |
Linked List Cycle II |
linked-list two-pointers |
|
1618 |
Maximum Font to Fit a Sentence in a Screen |
string binary-search |
|
510 |
Inorder Successor in BST II |
tree |
|
1379 |
Find a Corresponding Node of a Binary Tree in a Clone of That Tree |
tree |
|
1644 |
Lowest Common Ancestor of a Binary Tree II |
tree |
|
1650 |
Lowest Common Ancestor of a Binary Tree III |
tree |
|
429 |
N-ary Tree Level Order Traversal |
tree breadth-first-search |
|
1602 |
Find Nearest Right Node in Binary Tree |
tree breadth-first-search |
|
117 |
Populating Next Right Pointers in Each Node II |
tree depth-first-search |
|
116 |
Populating Next Right Pointers in Each Node |
tree depth-first-search breadth-first-search |
|
1628 |
Design an Expression Tree With Evaluate Function |
tree design |
|
1003 |
Check If Word Is Valid After Substitutions |
string stack |
solution |
1004 |
Max Consecutive Ones III |
two-pointers sliding-window |
solution |
1006 |
Clumsy Factorial |
math |
solution |
1007 |
Minimum Domino Rotations For Equal Row |
array greedy |
solution |
1008 |
Construct Binary Search Tree from Preorder Traversal |
tree |
solution |
1011 |
Capacity To Ship Packages Within D Days |
array binary-search |
solution |
1014 |
Best Sightseeing Pair |
array |
solution |
1015 |
Smallest Integer Divisible by K |
math |
solution |
1016 |
Binary String With Substrings Representing 1 To N |
string |
solution |
1017 |
Convert to Base -2 |
math |
solution |
1019 |
Next Greater Node In Linked List |
linked-list stack |
solution |
1020 |
Number of Enclaves |
depth-first-search |
solution |
1023 |
Camelcase Matching |
string trie |
solution |
1024 |
Video Stitching |
dynamic-programming |
solution |
1026 |
Maximum Difference Between Node and Ancestor |
tree depth-first-search |
solution |
1027 |
Longest Arithmetic Subsequence |
dynamic-programming |
solution |
1029 |
Two City Scheduling |
greedy |
solution |
102 |
Binary Tree Level Order Traversal |
tree breadth-first-search |
solution |
1031 |
Maximum Sum of Two Non-Overlapping Subarrays |
array |
solution |
1034 |
Coloring A Border |
depth-first-search |
solution |
1035 |
Uncrossed Lines |
array |
solution |
1038 |
Binary Search Tree to Greater Sum Tree |
binary-search-tree |
solution |
1039 |
Minimum Score Triangulation of Polygon |
dynamic-programming |
solution |
103 |
Binary Tree Zigzag Level Order Traversal |
stack tree breadth-first-search |
solution |
1040 |
Moving Stones Until Consecutive II |
array sliding-window |
solution |
1041 |
Robot Bounded In Circle |
math |
solution |
1042 |
Flower Planting With No Adjacent |
graph |
solution |
1043 |
Partition Array for Maximum Sum |
dynamic-programming |
solution |
1048 |
Longest String Chain |
hash-table dynamic-programming |
solution |
1049 |
Last Stone Weight II |
dynamic-programming |
solution |
1052 |
Grumpy Bookstore Owner |
array sliding-window |
solution |
1053 |
Previous Permutation With One Swap |
array greedy |
solution |
1054 |
Distant Barcodes |
heap sort |
solution |
1055 |
Shortest Way to Form String |
dynamic-programming greedy |
solution |
1057 |
Campus Bikes |
greedy sort |
solution |
1058 |
Minimize Rounding Error to Meet Target |
math dynamic-programming greedy |
solution |
1059 |
All Paths from Source Lead to Destination |
depth-first-search graph |
solution |
105 |
Construct Binary Tree from Preorder and Inorder Traversal |
array tree depth-first-search |
solution |
1060 |
Missing Element in Sorted Array |
binary-search |
solution |
1061 |
Lexicographically Smallest Equivalent String |
depth-first-search union-find |
solution |
1062 |
Longest Repeating Substring |
string |
solution |
1066 |
Campus Bikes II |
dynamic-programming backtracking |
solution |
106 |
Construct Binary Tree from Inorder and Postorder Traversal |
array tree depth-first-search |
solution |
1072 |
Flip Columns For Maximum Number of Equal Rows |
hash-table |
solution |
1073 |
Adding Two Negabinary Numbers |
math |
solution |
1079 |
Letter Tile Possibilities |
backtracking |
solution |
1080 |
Insufficient Nodes in Root to Leaf Paths |
depth-first-search |
solution |
1081 |
Smallest Subsequence of Distinct Characters |
string stack greedy |
solution |
1087 |
Brace Expansion |
backtracking |
solution |
1090 |
Largest Values From Labels |
hash-table greedy |
solution |
1091 |
Shortest Path in Binary Matrix |
breadth-first-search |
solution |
1093 |
Statistics from a Large Sample |
math two-pointers |
solution |
1094 |
Car Pooling |
greedy |
solution |
109 |
Convert Sorted List to Binary Search Tree |
linked-list depth-first-search |
solution |
1100 |
Find K-Length Substrings With No Repeated Characters |
string sliding-window |
solution |
1101 |
The Earliest Moment When Everyone Become Friends |
union-find |
solution |
1102 |
Path With Maximum Minimum Value |
depth-first-search union-find graph |
solution |
1104 |
Path In Zigzag Labelled Binary Tree |
math tree |
solution |
1105 |
Filling Bookcase Shelves |
dynamic-programming |
solution |
1109 |
Corporate Flight Bookings |
array math |
solution |
1110 |
Delete Nodes And Return Forest |
tree depth-first-search |
solution |
1111 |
Maximum Nesting Depth of Two Valid Parentheses Strings |
binary-search greedy |
solution |
1120 |
Maximum Average Subtree |
tree |
solution |
1123 |
Lowest Common Ancestor of Deepest Leaves |
tree depth-first-search |
solution |
1124 |
Longest Well-Performing Interval |
stack |
solution |
1129 |
Shortest Path with Alternating Colors |
breadth-first-search graph |
solution |
1130 |
Minimum Cost Tree From Leaf Values |
dynamic-programming stack tree |
solution |
1131 |
Maximum of Absolute Value Expression |
math bit-manipulation |
solution |
1135 |
Connecting Cities With Minimum Cost |
union-find graph |
solution |
1138 |
Alphabet Board Path |
hash-table string |
solution |
1139 |
Largest 1-Bordered Square |
dynamic-programming |
solution |
113 |
Path Sum II |
tree depth-first-search |
solution |
1140 |
Stone Game II |
dynamic-programming |
solution |
1143 |
Longest Common Subsequence |
dynamic-programming |
solution |
1144 |
Decrease Elements To Make Array Zigzag |
array |
solution |
1145 |
Binary Tree Coloring Game |
tree depth-first-search |
solution |
1146 |
Snapshot Array |
array |
solution |
114 |
Flatten Binary Tree to Linked List |
tree depth-first-search |
solution |
1151 |
Minimum Swaps to Group All 1's Together |
array sliding-window |
solution |
1152 |
Analyze User Website Visit Pattern |
array hash-table sort |
solution |
1155 |
Number of Dice Rolls With Target Sum |
dynamic-programming |
solution |
1156 |
Swap For Longest Repeated Character Substring |
string |
solution |
1161 |
Maximum Level Sum of a Binary Tree |
tree breadth-first-search |
solution |
1162 |
As Far from Land as Possible |
breadth-first-search graph |
solution |
1166 |
Design File System |
hash-table design |
solution |
1167 |
Minimum Cost to Connect Sticks |
greedy |
solution |
1169 |
Invalid Transactions |
array string |
solution |
1171 |
Remove Zero Sum Consecutive Nodes from Linked List |
linked-list |
solution |
1177 |
Can Make Palindrome from Substring |
array string |
solution |
1181 |
Before and After Puzzle |
string |
solution |
1182 |
Shortest Distance to Target Color |
binary-search |
solution |
1186 |
Maximum Subarray Sum with One Deletion |
dynamic-programming |
solution |
1190 |
Reverse Substrings Between Each Pair of Parentheses |
stack |
solution |
1191 |
K-Concatenation Maximum Sum |
dynamic-programming |
solution |
1197 |
Minimum Knight Moves |
breadth-first-search |
solution |
1198 |
Find Smallest Common Element in All Rows |
hash-table binary-search |
solution |
11 |
Container With Most Water |
array two-pointers |
solution |
1201 |
Ugly Number III |
math binary-search |
solution |
1202 |
Smallest String With Swaps |
array union-find |
solution |
1208 |
Get Equal Substrings Within Budget |
array sliding-window |
solution |
1209 |
Remove All Adjacent Duplicates in String II |
stack |
solution |
120 |
Triangle |
array dynamic-programming |
solution |
1214 |
Two Sum BSTs |
binary-search-tree |
solution |
1215 |
Stepping Numbers |
backtracking |
solution |
1218 |
Longest Arithmetic Subsequence of Given Difference |
math dynamic-programming |
solution |
1219 |
Path with Maximum Gold |
backtracking |
solution |
1222 |
Queens That Can Attack the King |
array |
solution |
1223 |
Dice Roll Simulation |
dynamic-programming |
solution |
1227 |
Airplane Seat Assignment Probability |
math dynamic-programming brainteaser |
solution |
1229 |
Meeting Scheduler |
line-sweep |
solution |
1230 |
Toss Strange Coins |
math dynamic-programming |
solution |
1233 |
Remove Sub-Folders from the Filesystem |
array string |
solution |
1234 |
Replace the Substring for Balanced String |
two-pointers string |
solution |
1238 |
Circular Permutation in Binary Representation |
math |
solution |
1239 |
Maximum Length of a Concatenated String with Unique Characters |
backtracking bit-manipulation |
solution |
1244 |
Design A Leaderboard |
hash-table sort design |
solution |
1245 |
Tree Diameter |
tree depth-first-search breadth-first-search |
solution |
1247 |
Minimum Swaps to Make Strings Equal |
string greedy |
solution |
1248 |
Count Number of Nice Subarrays |
two-pointers |
solution |
1249 |
Minimum Remove to Make Valid Parentheses |
string stack |
solution |
1253 |
Reconstruct a 2-Row Binary Matrix |
math greedy |
solution |
1254 |
Number of Closed Islands |
depth-first-search |
solution |
1256 |
Encode Number |
math bit-manipulation |
solution |
1257 |
Smallest Common Region |
tree |
solution |
1258 |
Synonymous Sentences |
backtracking |
solution |
1261 |
Find Elements in a Contaminated Binary Tree |
hash-table tree |
solution |
1262 |
Greatest Sum Divisible by Three |
dynamic-programming |
solution |
1267 |
Count Servers that Communicate |
array graph |
solution |
1268 |
Search Suggestions System |
string |
solution |
1272 |
Remove Interval |
math line-sweep |
solution |
1273 |
Delete Tree Nodes |
dynamic-programming depth-first-search |
solution |
1276 |
Number of Burgers with No Waste of Ingredients |
math greedy |
solution |
1277 |
Count Square Submatrices with All Ones |
array dynamic-programming |
solution |
127 |
Word Ladder |
breadth-first-search |
solution |
1282 |
Group the People Given the Group Size They Belong To |
greedy |
solution |
1283 |
Find the Smallest Divisor Given a Threshold |
binary-search |
solution |
1286 |
Iterator for Combination |
backtracking design |
solution |
1288 |
Remove Covered Intervals |
greedy sort line-sweep |
solution |
1291 |
Sequential Digits |
backtracking |
solution |
1292 |
Maximum Side Length of a Square with Sum Less than or Equal to Threshold |
array binary-search |
solution |
1296 |
Divide Array in Sets of K Consecutive Numbers |
array greedy |
solution |
1297 |
Maximum Number of Occurrences of a Substring |
string bit-manipulation |
solution |
129 |
Sum Root to Leaf Numbers |
tree depth-first-search |
solution |
12 |
Integer to Roman |
math string |
solution |
1300 |
Sum of Mutated Array Closest to Target |
array binary-search |
solution |
1302 |
Deepest Leaves Sum |
tree depth-first-search |
solution |
1305 |
All Elements in Two Binary Search Trees |
sort tree |
solution |
1306 |
Jump Game III |
breadth-first-search graph |
solution |
130 |
Surrounded Regions |
depth-first-search breadth-first-search union-find |
solution |
1310 |
XOR Queries of a Subarray |
bit-manipulation |
solution |
1311 |
Get Watched Videos by Your Friends |
hash-table string breadth-first-search |
solution |
1314 |
Matrix Block Sum |
dynamic-programming |
solution |
1315 |
Sum of Nodes with Even-Valued Grandparent |
tree depth-first-search |
solution |
1318 |
Minimum Flips to Make a OR b Equal to c |
bit-manipulation |
solution |
1319 |
Number of Operations to Make Network Connected |
depth-first-search breadth-first-search union-find |
solution |
131 |
Palindrome Partitioning |
backtracking |
solution |
1324 |
Print Words Vertically |
string |
solution |
1325 |
Delete Leaves With a Given Value |
tree |
solution |
1328 |
Break a Palindrome |
string |
solution |
1329 |
Sort the Matrix Diagonally |
array sort |
solution |
1333 |
Filter Restaurants by Vegan-Friendly, Price and Distance |
array sort |
solution |
1334 |
Find the City With the Smallest Number of Neighbors at a Threshold Distance |
graph |
solution |
1338 |
Reduce Array Size to The Half |
array greedy |
solution |
1339 |
Maximum Product of Splitted Binary Tree |
dynamic-programming tree depth-first-search |
solution |
1343 |
Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold |
array |
solution |
1344 |
Angle Between Hands of a Clock |
math |
solution |
1347 |
Minimum Number of Steps to Make Two Strings Anagram |
string |
solution |
1348 |
Tweet Counts Per Frequency |
design |
solution |
134 |
Gas Station |
greedy |
solution |
1352 |
Product of the Last K Numbers |
array design |
solution |
1353 |
Maximum Number of Events That Can Be Attended |
greedy sort segment-tree |
solution |
1357 |
Apply Discount Every n Orders |
design |
solution |
1358 |
Number of Substrings Containing All Three Characters |
string |
solution |
1361 |
Validate Binary Tree Nodes |
graph |
solution |
1362 |
Closest Divisors |
math |
solution |
1366 |
Rank Teams by Votes |
array sort |
solution |
1367 |
Linked List in Binary Tree |
linked-list dynamic-programming tree |
solution |
1371 |
Find the Longest Substring Containing Vowels in Even Counts |
string |
solution |
1372 |
Longest ZigZag Path in a Binary Tree |
dynamic-programming tree |
solution |
1375 |
Bulb Switcher III |
array |
solution |
1376 |
Time Needed to Inform All Employees |
depth-first-search |
solution |
137 |
Single Number II |
bit-manipulation |
solution |
1381 |
Design a Stack With Increment Operation |
stack design |
solution |
1382 |
Balance a Binary Search Tree |
binary-search-tree |
solution |
1386 |
Cinema Seat Allocation |
array greedy |
solution |
1387 |
Sort Integers by The Power Value |
sort graph |
solution |
1390 |
Four Divisors |
math |
solution |
1391 |
Check if There is a Valid Path in a Grid |
depth-first-search breadth-first-search |
solution |
1395 |
Count Number of Teams |
array |
solution |
1396 |
Design Underground System |
design |
solution |
139 |
Word Break |
dynamic-programming |
solution |
1400 |
Construct K Palindrome Strings |
greedy |
solution |
1401 |
Circle and Rectangle Overlapping |
geometry |
solution |
1404 |
Number of Steps to Reduce a Number in Binary Representation to One |
string bit-manipulation |
solution |
1405 |
Longest Happy String |
dynamic-programming greedy |
solution |
1409 |
Queries on a Permutation With Key |
array |
solution |
1410 |
HTML Entity Parser |
string stack |
solution |
1414 |
Find the Minimum Number of Fibonacci Numbers Whose Sum Is K |
array greedy |
solution |
1415 |
The k-th Lexicographical String of All Happy Strings of Length n |
backtracking |
solution |
1418 |
Display Table of Food Orders in a Restaurant |
hash-table |
solution |
1419 |
Minimum Number of Frogs Croaking |
string |
solution |
1423 |
Maximum Points You Can Obtain from Cards |
array dynamic-programming sliding-window |
solution |
1424 |
Diagonal Traverse II |
array sort |
solution |
1428 |
Leftmost Column with at Least a One |
array |
solution |
1429 |
First Unique Number |
hash-table design |
solution |
1430 |
Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree |
tree |
solution |
1432 |
Max Difference You Can Get From Changing an Integer |
string |
solution |
1433 |
Check If a String Can Break Another String |
string greedy |
solution |
1437 |
Check If All 1's Are at Least Length K Places Away |
array |
solution |
1438 |
Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit |
array sliding-window |
solution |
143 |
Reorder List |
linked-list |
solution |
1442 |
Count Triplets That Can Form Two Arrays of Equal XOR |
array math bit-manipulation |
solution |
1443 |
Minimum Time to Collect All Apples in a Tree |
tree depth-first-search |
solution |
1447 |
Simplified Fractions |
math |
solution |
1448 |
Count Good Nodes in Binary Tree |
tree depth-first-search |
solution |
144 |
Binary Tree Preorder Traversal |
stack tree |
solution |
1451 |
Rearrange Words in a Sentence |
string sort |
solution |
1452 |
People Whose List of Favorite Companies Is Not a Subset of Another List |
string sort |
solution |
1456 |
Maximum Number of Vowels in a Substring of Given Length |
string sliding-window |
solution |
1457 |
Pseudo-Palindromic Paths in a Binary Tree |
bit-manipulation tree depth-first-search |
solution |
145 |
Binary Tree Postorder Traversal |
stack tree |
solution |
1461 |
Check If a String Contains All Binary Codes of Size K |
string bit-manipulation |
solution |
1462 |
Course Schedule IV |
graph |
solution |
1465 |
Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts |
array |
solution |
1466 |
Reorder Routes to Make All Paths Lead to the City Zero |
tree depth-first-search |
solution |
146 |
LRU Cache |
design |
solution |
1471 |
The k Strongest Values in an Array |
array sort |
solution |
1472 |
Design Browser History |
design |
solution |
1476 |
Subrectangle Queries |
array |
solution |
1477 |
Find Two Non-overlapping Sub-arrays Each With Target Sum |
dynamic-programming |
solution |
147 |
Insertion Sort List |
linked-list sort |
solution |
1481 |
Least Number of Unique Integers after K Removals |
array sort |
solution |
1482 |
Minimum Number of Days to Make m Bouquets |
array binary-search |
solution |
1487 |
Making File Names Unique |
hash-table string |
solution |
1488 |
Avoid Flood in The City |
array hash-table |
solution |
148 |
Sort List |
linked-list sort |
solution |
1492 |
The kth Factor of n |
math |
solution |
1493 |
Longest Subarray of 1's After Deleting One Element |
array |
solution |
1497 |
Check If Array Pairs Are Divisible by k |
array math greedy |
solution |
1498 |
Number of Subsequences That Satisfy the Given Sum Condition |
sort sliding-window |
solution |
1500 |
Design a File Sharing System |
array design |
solution |
1503 |
Last Moment Before All Ants Fall Out of a Plank |
array brainteaser |
solution |
1504 |
Count Submatrices With All Ones |
dynamic-programming |
solution |
1508 |
Range Sum of Sorted Subarray Sums |
array sort |
solution |
1509 |
Minimum Difference Between Largest and Smallest Value in Three Moves |
array sort |
solution |
150 |
Evaluate Reverse Polish Notation |
stack |
solution |
1513 |
Number of Substrings With Only 1s |
math string |
solution |
1514 |
Path with Maximum Probability |
graph |
solution |
1519 |
Number of Nodes in the Sub-Tree With the Same Label |
depth-first-search breadth-first-search |
solution |
151 |
Reverse Words in a String |
string |
solution |
1524 |
Number of Sub-arrays With Odd Sum |
array math |
solution |
1525 |
Number of Good Ways to Split a String |
string bit-manipulation |
solution |
1529 |
Bulb Switcher IV |
string |
solution |
152 |
Maximum Product Subarray |
array dynamic-programming |
solution |
1530 |
Number of Good Leaf Nodes Pairs |
tree depth-first-search |
solution |
1533 |
Find the Index of the Large Integer |
binary-search |
solution |
1535 |
Find the Winner of an Array Game |
array |
solution |
1536 |
Minimum Swaps to Arrange a Binary Grid |
greedy |
solution |
1538 |
Guess the Majority in a Hidden Array |
|
solution |
153 |
Find Minimum in Rotated Sorted Array |
array binary-search |
solution |
1540 |
Can Convert String in K Moves |
string greedy |
solution |
1541 |
Minimum Insertions to Balance a Parentheses String |
string stack |
solution |
1545 |
Find Kth Bit in Nth Binary String |
string |
solution |
1546 |
Maximum Number of Non-Overlapping Subarrays With Sum Equals Target |
dynamic-programming |
solution |
1551 |
Minimum Operations to Make Array Equal |
math |
solution |
1552 |
Magnetic Force Between Two Balls |
array binary-search |
solution |
1554 |
Strings Differ by One Character |
|
solution |
1557 |
Minimum Number of Vertices to Reach All Nodes |
graph |
solution |
1558 |
Minimum Numbers of Function Calls to Make Target Array |
greedy |
solution |
1561 |
Maximum Number of Coins You Can Get |
sort |
solution |
1562 |
Find Latest Group of Size M |
binary-search |
solution |
1564 |
Put Boxes Into the Warehouse I |
greedy |
solution |
1567 |
Maximum Length of Subarray With Positive Product |
greedy |
solution |
156 |
Binary Tree Upside Down |
tree |
solution |
1570 |
Dot Product of Two Sparse Vectors |
array hash-table two-pointers |
solution |
1573 |
Number of Ways to Split a String |
string |
solution |
1574 |
Shortest Subarray to be Removed to Make Array Sorted |
array binary-search |
solution |
1577 |
Number of Ways Where Square of Number Is Equal to Product of Two Numbers |
hash-table math |
solution |
1578 |
Minimum Deletion Cost to Avoid Repeating Letters |
greedy |
solution |
1580 |
Put Boxes Into the Warehouse II |
greedy |
solution |
1583 |
Count Unhappy Friends |
array |
solution |
1584 |
Min Cost to Connect All Points |
union-find |
solution |
1586 |
Binary Search Tree Iterator II |
tree design |
solution |
1589 |
Maximum Sum Obtained of Any Permutation |
greedy |
solution |
1590 |
Make Sum Divisible by P |
array hash-table math binary-search |
solution |
1593 |
Split a String Into the Max Number of Unique Substrings |
backtracking |
solution |
1594 |
Maximum Non Negative Product in a Matrix |
dynamic-programming greedy |
solution |
1599 |
Maximum Profit of Operating a Centennial Wheel |
greedy |
solution |
159 |
Longest Substring with At Most Two Distinct Characters |
hash-table two-pointers string sliding-window |
solution |
15 |
3Sum |
array two-pointers |
solution |
1600 |
Throne Inheritance |
tree design |
solution |
1604 |
Alert Using Same Key-Card Three or More Times in a One Hour Period |
string ordered-map |
solution |
1605 |
Find Valid Matrix Given Row and Column Sums |
greedy |
solution |
1609 |
Even Odd Tree |
tree |
solution |
1615 |
Maximal Network Rank |
graph |
solution |
1616 |
Split Two Strings to Make Palindrome |
two-pointers string greedy |
solution |
161 |
One Edit Distance |
string |
solution |
1620 |
Coordinate With Maximum Network Quality |
greedy |
solution |
1621 |
Number of Sets of K Non-Overlapping Line Segments |
dynamic-programming |
solution |
1625 |
Lexicographically Smallest String After Applying Operations |
depth-first-search breadth-first-search |
solution |
1626 |
Best Team With No Conflicts |
dynamic-programming |
solution |
162 |
Find Peak Element |
array binary-search |
solution |
1630 |
Arithmetic Subarrays |
sort |
solution |
1631 |
Path With Minimum Effort |
binary-search depth-first-search union-find graph |
solution |
1637 |
Widest Vertical Area Between Two Points Containing No Points |
sort |
solution |
1638 |
Count Substrings That Differ by One Character |
hash-table string trie rolling-hash |
solution |
1641 |
Count Sorted Vowel Strings |
math dynamic-programming backtracking |
solution |
1642 |
Furthest Building You Can Reach |
binary-search heap |
solution |
1647 |
Minimum Deletions to Make Character Frequencies Unique |
greedy sort |
solution |
1648 |
Sell Diminishing-Valued Colored Balls |
math greedy sort |
solution |
1653 |
Minimum Deletions to Make String Balanced |
string greedy |
solution |
1654 |
Minimum Jumps to Reach Home |
dynamic-programming breadth-first-search |
solution |
1657 |
Determine if Two Strings Are Close |
greedy |
solution |
1658 |
Minimum Operations to Reduce X to Zero |
two-pointers binary-search greedy |
solution |
165 |
Compare Version Numbers |
string |
solution |
166 |
Fraction to Recurring Decimal |
hash-table math |
solution |
16 |
3Sum Closest |
array two-pointers |
solution |
173 |
Binary Search Tree Iterator |
stack tree design |
solution |
179 |
Largest Number |
sort |
solution |
17 |
Letter Combinations of a Phone Number |
string backtracking |
solution |
186 |
Reverse Words in a String II |
string |
solution |
187 |
Repeated DNA Sequences |
hash-table bit-manipulation |
solution |
189 |
Rotate Array |
array |
solution |
18 |
4Sum |
array hash-table two-pointers |
solution |
199 |
Binary Tree Right Side View |
tree depth-first-search breadth-first-search |
solution |
19 |
Remove Nth Node From End of List |
linked-list two-pointers |
solution |
200 |
Number of Islands |
depth-first-search breadth-first-search union-find |
solution |
201 |
Bitwise AND of Numbers Range |
bit-manipulation |
solution |
207 |
Course Schedule |
depth-first-search breadth-first-search graph topological-sort |
solution |
208 |
Implement Trie (Prefix Tree) |
design trie |
solution |
209 |
Minimum Size Subarray Sum |
array two-pointers binary-search |
solution |
210 |
Course Schedule II |
depth-first-search breadth-first-search graph topological-sort |
solution |
211 |
Design Add and Search Words Data Structure |
backtracking design trie |
solution |
213 |
House Robber II |
dynamic-programming |
solution |
215 |
Kth Largest Element in an Array |
divide-and-conquer heap |
solution |
216 |
Combination Sum III |
array backtracking |
solution |
220 |
Contains Duplicate III |
sort ordered-map |
solution |
221 |
Maximal Square |
dynamic-programming |
solution |
222 |
Count Complete Tree Nodes |
binary-search tree |
solution |
223 |
Rectangle Area |
math |
solution |
227 |
Basic Calculator II |
string stack |
solution |
229 |
Majority Element II |
array |
solution |
22 |
Generate Parentheses |
string backtracking |
solution |
230 |
Kth Smallest Element in a BST |
binary-search tree |
solution |
236 |
Lowest Common Ancestor of a Binary Tree |
tree |
solution |
238 |
Product of Array Except Self |
array |
solution |
240 |
Search a 2D Matrix II |
binary-search divide-and-conquer |
solution |
241 |
Different Ways to Add Parentheses |
divide-and-conquer |
solution |
244 |
Shortest Word Distance II |
hash-table design |
solution |
245 |
Shortest Word Distance III |
array |
solution |
247 |
Strobogrammatic Number II |
math recursion |
solution |
249 |
Group Shifted Strings |
hash-table string |
solution |
24 |
Swap Nodes in Pairs |
linked-list |
solution |
250 |
Count Univalue Subtrees |
tree |
solution |
251 |
Flatten 2D Vector |
design |
solution |
253 |
Meeting Rooms II |
heap greedy sort |
solution |
254 |
Factor Combinations |
backtracking |
solution |
255 |
Verify Preorder Sequence in Binary Search Tree |
stack tree |
solution |
256 |
Paint House |
dynamic-programming |
solution |
259 |
3Sum Smaller |
array two-pointers |
solution |
260 |
Single Number III |
bit-manipulation |
solution |
261 |
Graph Valid Tree |
depth-first-search breadth-first-search union-find graph |
solution |
264 |
Ugly Number II |
math dynamic-programming heap |
solution |
267 |
Palindrome Permutation II |
backtracking |
solution |
271 |
Encode and Decode Strings |
string |
solution |
274 |
H-Index |
hash-table sort |
solution |
275 |
H-Index II |
binary-search |
solution |
277 |
Find the Celebrity |
array |
solution |
279 |
Perfect Squares |
math dynamic-programming breadth-first-search |
solution |
280 |
Wiggle Sort |
array sort |
solution |
281 |
Zigzag Iterator |
design |
solution |
285 |
Inorder Successor in BST |
tree |
solution |
286 |
Walls and Gates |
breadth-first-search |
solution |
287 |
Find the Duplicate Number |
array two-pointers binary-search |
solution |
288 |
Unique Word Abbreviation |
hash-table design |
solution |
289 |
Game of Life |
array |
solution |
294 |
Flip Game II |
backtracking minimax |
solution |
298 |
Binary Tree Longest Consecutive Sequence |
tree |
solution |
299 |
Bulls and Cows |
hash-table |
solution |
29 |
Divide Two Integers |
math binary-search |
solution |
2 |
Add Two Numbers |
linked-list math |
solution |
300 |
Longest Increasing Subsequence |
binary-search dynamic-programming |
solution |
304 |
Range Sum Query 2D - Immutable |
dynamic-programming |
solution |
306 |
Additive Number |
backtracking |
solution |
307 |
Range Sum Query - Mutable |
binary-indexed-tree segment-tree |
solution |
309 |
Best Time to Buy and Sell Stock with Cooldown |
dynamic-programming |
solution |
310 |
Minimum Height Trees |
breadth-first-search graph |
solution |
311 |
Sparse Matrix Multiplication |
hash-table |
solution |
313 |
Super Ugly Number |
math heap |
solution |
314 |
Binary Tree Vertical Order Traversal |
depth-first-search breadth-first-search |
solution |
316 |
Remove Duplicate Letters |
string stack greedy |
solution |
318 |
Maximum Product of Word Lengths |
bit-manipulation |
solution |
319 |
Bulb Switcher |
math brainteaser |
solution |
31 |
Next Permutation |
array |
solution |
320 |
Generalized Abbreviation |
backtracking bit-manipulation |
solution |
322 |
Coin Change |
dynamic-programming |
solution |
323 |
Number of Connected Components in an Undirected Graph |
depth-first-search breadth-first-search union-find graph |
solution |
324 |
Wiggle Sort II |
sort |
solution |
325 |
Maximum Size Subarray Sum Equals k |
hash-table |
solution |
328 |
Odd Even Linked List |
linked-list |
solution |
331 |
Verify Preorder Serialization of a Binary Tree |
stack |
solution |
332 |
Reconstruct Itinerary |
depth-first-search graph |
solution |
333 |
Largest BST Subtree |
tree |
solution |
334 |
Increasing Triplet Subsequence |
|
solution |
337 |
House Robber III |
dynamic-programming tree depth-first-search |
solution |
338 |
Counting Bits |
dynamic-programming bit-manipulation |
solution |
33 |
Search in Rotated Sorted Array |
array binary-search |
solution |
341 |
Flatten Nested List Iterator |
stack design |
solution |
343 |
Integer Break |
math dynamic-programming |
solution |
347 |
Top K Frequent Elements |
hash-table heap |
solution |
348 |
Design Tic-Tac-Toe |
design |
solution |
34 |
Find First and Last Position of Element in Sorted Array |
array binary-search |
solution |
351 |
Android Unlock Patterns |
dynamic-programming backtracking |
solution |
353 |
Design Snake Game |
design queue |
solution |
355 |
Design Twitter |
hash-table heap design |
solution |
356 |
Line Reflection |
hash-table math |
solution |
357 |
Count Numbers with Unique Digits |
math dynamic-programming backtracking |
solution |
360 |
Sort Transformed Array |
math two-pointers sort |
solution |
361 |
Bomb Enemy |
dynamic-programming |
solution |
362 |
Design Hit Counter |
design |
solution |
364 |
Nested List Weight Sum II |
depth-first-search |
solution |
365 |
Water and Jug Problem |
math |
solution |
366 |
Find Leaves of Binary Tree |
tree depth-first-search |
solution |
368 |
Largest Divisible Subset |
math dynamic-programming |
solution |
369 |
Plus One Linked List |
linked-list |
solution |
36 |
Valid Sudoku |
hash-table |
solution |
370 |
Range Addition |
array |
solution |
371 |
Sum of Two Integers |
bit-manipulation |
solution |
372 |
Super Pow |
math |
solution |
373 |
Find K Pairs with Smallest Sums |
heap |
solution |
375 |
Guess Number Higher or Lower II |
dynamic-programming minimax |
solution |
376 |
Wiggle Subsequence |
dynamic-programming greedy |
solution |
377 |
Combination Sum IV |
dynamic-programming |
solution |
378 |
Kth Smallest Element in a Sorted Matrix |
binary-search heap |
solution |
379 |
Design Phone Directory |
linked-list design |
solution |
380 |
Insert Delete GetRandom O(1) |
array hash-table design |
solution |
382 |
Linked List Random Node |
reservoir-sampling |
solution |
384 |
Shuffle an Array |
|
solution |
385 |
Mini Parser |
string stack |
solution |
386 |
Lexicographical Numbers |
|
solution |
388 |
Longest Absolute File Path |
|
solution |
390 |
Elimination Game |
|
solution |
393 |
UTF-8 Validation |
bit-manipulation |
solution |
394 |
Decode String |
stack depth-first-search |
solution |
395 |
Longest Substring with At Least K Repeating Characters |
|
solution |
396 |
Rotate Function |
math |
solution |
397 |
Integer Replacement |
math bit-manipulation |
solution |
398 |
Random Pick Index |
reservoir-sampling |
solution |
399 |
Evaluate Division |
union-find graph |
solution |
39 |
Combination Sum |
array backtracking |
solution |
3 |
Longest Substring Without Repeating Characters |
hash-table two-pointers string sliding-window |
solution |
400 |
Nth Digit |
math |
solution |
402 |
Remove K Digits |
stack greedy |
solution |
406 |
Queue Reconstruction by Height |
greedy |
solution |
40 |
Combination Sum II |
array backtracking |
solution |
413 |
Arithmetic Slices |
math dynamic-programming |
solution |
416 |
Partition Equal Subset Sum |
dynamic-programming |
solution |
417 |
Pacific Atlantic Water Flow |
depth-first-search breadth-first-search |
solution |
418 |
Sentence Screen Fitting |
dynamic-programming |
solution |
419 |
Battleships in a Board |
|
solution |
421 |
Maximum XOR of Two Numbers in an Array |
bit-manipulation trie |
solution |
423 |
Reconstruct Original Digits from English |
math |
solution |
424 |
Longest Repeating Character Replacement |
two-pointers sliding-window |
solution |
433 |
Minimum Genetic Mutation |
|
solution |
435 |
Non-overlapping Intervals |
greedy |
solution |
436 |
Find Right Interval |
binary-search |
solution |
437 |
Path Sum III |
tree |
solution |
438 |
Find All Anagrams in a String |
hash-table |
solution |
439 |
Ternary Expression Parser |
stack depth-first-search |
solution |
43 |
Multiply Strings |
math string |
solution |
442 |
Find All Duplicates in an Array |
array |
solution |
443 |
String Compression |
string |
solution |
444 |
Sequence Reconstruction |
graph topological-sort |
solution |
445 |
Add Two Numbers II |
linked-list |
solution |
447 |
Number of Boomerangs |
hash-table math |
solution |
449 |
Serialize and Deserialize BST |
tree |
solution |
450 |
Delete Node in a BST |
tree |
solution |
451 |
Sort Characters By Frequency |
hash-table heap |
solution |
452 |
Minimum Number of Arrows to Burst Balloons |
greedy sort |
solution |
454 |
4Sum II |
hash-table binary-search |
solution |
456 |
132 Pattern |
stack |
solution |
457 |
Circular Array Loop |
array two-pointers |
solution |
462 |
Minimum Moves to Equal Array Elements II |
math |
solution |
464 |
Can I Win |
dynamic-programming minimax |
solution |
467 |
Unique Substrings in Wraparound String |
dynamic-programming |
solution |
468 |
Validate IP Address |
string |
solution |
469 |
Convex Polygon |
math |
solution |
46 |
Permutations |
backtracking |
solution |
470 |
Implement Rand10() Using Rand7() |
random rejection-sampling |
solution |
473 |
Matchsticks to Square |
depth-first-search |
solution |
474 |
Ones and Zeroes |
dynamic-programming |
solution |
475 |
Heaters |
binary-search |
solution |
477 |
Total Hamming Distance |
bit-manipulation |
solution |
478 |
Generate Random Point in a Circle |
math random rejection-sampling |
solution |
47 |
Permutations II |
backtracking |
solution |
481 |
Magical String |
|
solution |
484 |
Find Permutation |
greedy |
solution |
486 |
Predict the Winner |
dynamic-programming minimax |
solution |
487 |
Max Consecutive Ones II |
two-pointers |
solution |
48 |
Rotate Image |
array |
solution |
490 |
The Maze |
depth-first-search breadth-first-search |
solution |
491 |
Increasing Subsequences |
depth-first-search |
solution |
494 |
Target Sum |
dynamic-programming depth-first-search |
solution |
495 |
Teemo Attacking |
array |
solution |
497 |
Random Point in Non-overlapping Rectangles |
binary-search random |
solution |
498 |
Diagonal Traverse |
|
solution |
49 |
Group Anagrams |
hash-table string |
solution |
503 |
Next Greater Element II |
stack |
solution |
505 |
The Maze II |
depth-first-search breadth-first-search |
solution |
508 |
Most Frequent Subtree Sum |
hash-table tree |
solution |
50 |
Pow(x, n) |
math binary-search |
solution |
513 |
Find Bottom Left Tree Value |
tree depth-first-search breadth-first-search |
solution |
515 |
Find Largest Value in Each Tree Row |
tree depth-first-search breadth-first-search |
solution |
516 |
Longest Palindromic Subsequence |
dynamic-programming |
solution |
518 |
Coin Change 2 |
|
solution |
519 |
Random Flip Matrix |
random |
solution |
522 |
Longest Uncommon Subsequence II |
string |
solution |
523 |
Continuous Subarray Sum |
math dynamic-programming |
solution |
524 |
Longest Word in Dictionary through Deleting |
two-pointers sort |
solution |
525 |
Contiguous Array |
hash-table |
solution |
526 |
Beautiful Arrangement |
backtracking |
solution |
528 |
Random Pick with Weight |
binary-search random |
solution |
529 |
Minesweeper |
depth-first-search breadth-first-search |
solution |
531 |
Lonely Pixel I |
array depth-first-search |
solution |
532 |
K-diff Pairs in an Array |
array two-pointers |
solution |
533 |
Lonely Pixel II |
array |
solution |
535 |
Encode and Decode TinyURL |
hash-table math |
solution |
536 |
Construct Binary Tree from String |
string tree |
solution |
537 |
Complex Number Multiplication |
math string |
solution |
538 |
Convert BST to Greater Tree |
tree |
solution |
539 |
Minimum Time Difference |
string |
solution |
540 |
Single Element in a Sorted Array |
|
solution |
542 |
01 Matrix |
depth-first-search breadth-first-search |
solution |
544 |
Output Contest Matches |
string recursion |
solution |
545 |
Boundary of Binary Tree |
tree |
solution |
547 |
Friend Circles |
depth-first-search union-find |
solution |
548 |
Split Array with Equal Sum |
array |
solution |
549 |
Binary Tree Longest Consecutive Sequence II |
tree |
solution |
54 |
Spiral Matrix |
array |
solution |
553 |
Optimal Division |
math string |
solution |
554 |
Brick Wall |
hash-table |
solution |
555 |
Split Concatenated Strings |
string |
solution |
556 |
Next Greater Element III |
string |
solution |
55 |
Jump Game |
array greedy |
solution |
560 |
Subarray Sum Equals K |
array hash-table |
solution |
562 |
Longest Line of Consecutive One in Matrix |
array |
solution |
565 |
Array Nesting |
array |
solution |
567 |
Permutation in String |
two-pointers sliding-window |
solution |
56 |
Merge Intervals |
array sort |
solution |
573 |
Squirrel Simulation |
math |
solution |
576 |
Out of Boundary Paths |
dynamic-programming depth-first-search |
solution |
57 |
Insert Interval |
array sort |
solution |
581 |
Shortest Unsorted Continuous Subarray |
array |
solution |
582 |
Kill Process |
tree queue |
solution |
583 |
Delete Operation for Two Strings |
string |
solution |
592 |
Fraction Addition and Subtraction |
math |
solution |
593 |
Valid Square |
math |
solution |
59 |
Spiral Matrix II |
array |
solution |
5 |
Longest Palindromic Substring |
string dynamic-programming |
solution |
609 |
Find Duplicate File in System |
hash-table string |
solution |
611 |
Valid Triangle Number |
array |
solution |
616 |
Add Bold Tag in String |
string |
solution |
61 |
Rotate List |
linked-list two-pointers |
solution |
621 |
Task Scheduler |
array greedy queue |
solution |
622 |
Design Circular Queue |
design queue |
solution |
623 |
Add One Row to Tree |
tree |
solution |
624 |
Maximum Distance in Arrays |
array hash-table |
solution |
625 |
Minimum Factorization |
math recursion |
solution |
62 |
Unique Paths |
array dynamic-programming |
solution |
633 |
Sum of Square Numbers |
math |
solution |
634 |
Find the Derangement of An Array |
math |
solution |
635 |
Design Log Storage System |
string design |
solution |
636 |
Exclusive Time of Functions |
stack |
solution |
638 |
Shopping Offers |
dynamic-programming depth-first-search |
solution |
63 |
Unique Paths II |
array dynamic-programming |
solution |
640 |
Solve the Equation |
math |
solution |
641 |
Design Circular Deque |
design queue |
solution |
646 |
Maximum Length of Pair Chain |
dynamic-programming |
solution |
647 |
Palindromic Substrings |
string dynamic-programming |
solution |
648 |
Replace Words |
hash-table trie |
solution |
649 |
Dota2 Senate |
greedy |
solution |
64 |
Minimum Path Sum |
array dynamic-programming |
solution |
650 |
2 Keys Keyboard |
dynamic-programming |
solution |
651 |
4 Keys Keyboard |
math dynamic-programming greedy |
solution |
652 |
Find Duplicate Subtrees |
tree |
solution |
654 |
Maximum Binary Tree |
tree |
solution |
655 |
Print Binary Tree |
tree |
solution |
658 |
Find K Closest Elements |
binary-search |
solution |
659 |
Split Array into Consecutive Subsequences |
heap greedy |
solution |
662 |
Maximum Width of Binary Tree |
tree |
solution |
663 |
Equal Tree Partition |
tree |
solution |
666 |
Path Sum IV |
tree |
solution |
667 |
Beautiful Arrangement II |
array |
solution |
670 |
Maximum Swap |
array math |
solution |
672 |
Bulb Switcher II |
math |
solution |
676 |
Implement Magic Dictionary |
hash-table trie |
solution |
677 |
Map Sum Pairs |
trie |
solution |
678 |
Valid Parenthesis String |
string |
solution |
681 |
Next Closest Time |
string |
solution |
684 |
Redundant Connection |
tree union-find graph |
solution |
686 |
Repeated String Match |
string |
solution |
687 |
Longest Univalue Path |
tree recursion |
solution |
688 |
Knight Probability in Chessboard |
dynamic-programming |
solution |
692 |
Top K Frequent Words |
hash-table heap trie |
solution |
694 |
Number of Distinct Islands |
hash-table depth-first-search |
solution |
695 |
Max Area of Island |
array depth-first-search |
solution |
698 |
Partition to K Equal Sum Subsets |
dynamic-programming recursion |
solution |
6 |
ZigZag Conversion |
string |
solution |
701 |
Insert into a Binary Search Tree |
tree |
solution |
707 |
Design Linked List |
linked-list design |
solution |
712 |
Minimum ASCII Delete Sum for Two Strings |
dynamic-programming |
solution |
713 |
Subarray Product Less Than K |
array two-pointers |
solution |
714 |
Best Time to Buy and Sell Stock with Transaction Fee |
array dynamic-programming greedy |
solution |
718 |
Maximum Length of Repeated Subarray |
array hash-table binary-search dynamic-programming |
solution |
71 |
Simplify Path |
string stack |
solution |
721 |
Accounts Merge |
depth-first-search union-find |
solution |
722 |
Remove Comments |
string |
solution |
723 |
Candy Crush |
array two-pointers |
solution |
725 |
Split Linked List in Parts |
linked-list |
solution |
729 |
My Calendar I |
array |
solution |
731 |
My Calendar II |
ordered-map |
solution |
735 |
Asteroid Collision |
stack |
solution |
737 |
Sentence Similarity II |
depth-first-search union-find |
solution |
738 |
Monotone Increasing Digits |
greedy |
solution |
739 |
Daily Temperatures |
hash-table stack |
solution |
73 |
Set Matrix Zeroes |
array |
solution |
740 |
Delete and Earn |
dynamic-programming |
solution |
742 |
Closest Leaf in a Binary Tree |
tree |
solution |
743 |
Network Delay Time |
heap depth-first-search breadth-first-search graph |
solution |
74 |
Search a 2D Matrix |
array binary-search |
solution |
750 |
Number Of Corner Rectangles |
dynamic-programming |
solution |
751 |
IP to CIDR |
bit-manipulation |
solution |
752 |
Open the Lock |
breadth-first-search |
solution |
754 |
Reach a Number |
math |
solution |
755 |
Pour Water |
array |
solution |
756 |
Pyramid Transition Matrix |
bit-manipulation depth-first-search |
solution |
75 |
Sort Colors |
array two-pointers sort |
solution |
763 |
Partition Labels |
two-pointers greedy |
solution |
764 |
Largest Plus Sign |
dynamic-programming |
solution |
767 |
Reorganize String |
string heap greedy sort |
solution |
769 |
Max Chunks To Make Sorted |
array |
solution |
775 |
Global and Local Inversions |
array math |
solution |
776 |
Split BST |
tree recursion |
solution |
777 |
Swap Adjacent in LR String |
brainteaser |
solution |
779 |
K-th Symbol in Grammar |
recursion |
solution |
77 |
Combinations |
backtracking |
solution |
781 |
Rabbits in Forest |
hash-table math |
solution |
784 |
Letter Case Permutation |
backtracking bit-manipulation |
solution |
785 |
Is Graph Bipartite? |
depth-first-search breadth-first-search graph |
solution |
787 |
Cheapest Flights Within K Stops |
dynamic-programming heap breadth-first-search |
solution |
789 |
Escape The Ghosts |
math |
solution |
78 |
Subsets |
array backtracking bit-manipulation |
solution |
790 |
Domino and Tromino Tiling |
dynamic-programming |
solution |
791 |
Custom Sort String |
string |
solution |
792 |
Number of Matching Subsequences |
array |
solution |
794 |
Valid Tic-Tac-Toe State |
math recursion |
solution |
795 |
Number of Subarrays with Bounded Maximum |
array |
solution |
797 |
All Paths From Source to Target |
backtracking depth-first-search graph |
solution |
799 |
Champagne Tower |
dynamic-programming |
solution |
79 |
Word Search |
array backtracking |
solution |
801 |
Minimum Swaps To Make Sequences Increasing |
dynamic-programming |
solution |
802 |
Find Eventual Safe States |
depth-first-search graph |
solution |
807 |
Max Increase to Keep City Skyline |
|
solution |
808 |
Soup Servings |
dynamic-programming |
solution |
809 |
Expressive Words |
string |
solution |
80 |
Remove Duplicates from Sorted Array II |
array two-pointers |
solution |
813 |
Largest Sum of Averages |
dynamic-programming |
solution |
814 |
Binary Tree Pruning |
tree |
solution |
816 |
Ambiguous Coordinates |
string |
solution |
817 |
Linked List Components |
linked-list |
solution |
81 |
Search in Rotated Sorted Array II |
array binary-search |
solution |
820 |
Short Encoding of Words |
|
solution |
822 |
Card Flipping Game |
|
solution |
823 |
Binary Trees With Factors |
|
solution |
825 |
Friends Of Appropriate Ages |
array |
solution |
826 |
Most Profit Assigning Work |
two-pointers |
solution |
82 |
Remove Duplicates from Sorted List II |
linked-list |
solution |
831 |
Masking Personal Information |
string |
solution |
833 |
Find And Replace in String |
string |
solution |
835 |
Image Overlap |
array |
solution |
837 |
New 21 Game |
dynamic-programming |
solution |
838 |
Push Dominoes |
two-pointers dynamic-programming |
solution |
840 |
Magic Squares In Grid |
array |
solution |
841 |
Keys and Rooms |
depth-first-search graph |
solution |
842 |
Split Array into Fibonacci Sequence |
string backtracking greedy |
solution |
845 |
Longest Mountain in Array |
two-pointers |
solution |
846 |
Hand of Straights |
ordered-map |
solution |
848 |
Shifting Letters |
string |
solution |
849 |
Maximize Distance to Closest Person |
array |
solution |
851 |
Loud and Rich |
depth-first-search |
solution |
853 |
Car Fleet |
sort |
solution |
855 |
Exam Room |
ordered-map |
solution |
856 |
Score of Parentheses |
string stack |
solution |
858 |
Mirror Reflection |
math |
solution |
861 |
Score After Flipping Matrix |
greedy |
solution |
863 |
All Nodes Distance K in Binary Tree |
tree depth-first-search breadth-first-search |
solution |
865 |
Smallest Subtree with all the Deepest Nodes |
tree |
solution |
866 |
Prime Palindrome |
math |
solution |
869 |
Reordered Power of 2 |
math |
solution |
86 |
Partition List |
linked-list two-pointers |
solution |
870 |
Advantage Shuffle |
array greedy |
solution |
873 |
Length of Longest Fibonacci Subsequence |
array dynamic-programming |
solution |
875 |
Koko Eating Bananas |
binary-search |
solution |
877 |
Stone Game |
math dynamic-programming minimax |
solution |
880 |
Decoded String at Index |
stack |
solution |
881 |
Boats to Save People |
two-pointers greedy |
solution |
885 |
Spiral Matrix III |
math |
solution |
886 |
Possible Bipartition |
depth-first-search graph |
solution |
889 |
Construct Binary Tree from Preorder and Postorder Traversal |
tree |
solution |
890 |
Find and Replace Pattern |
string |
solution |
894 |
All Possible Full Binary Trees |
tree recursion |
solution |
898 |
Bitwise ORs of Subarrays |
dynamic-programming bit-manipulation |
solution |
89 |
Gray Code |
backtracking |
solution |
8 |
String to Integer (atoi) |
math string |
solution |
900 |
RLE Iterator |
array |
solution |
901 |
Online Stock Span |
stack |
solution |
904 |
Fruit Into Baskets |
two-pointers |
solution |
907 |
Sum of Subarray Minimums |
array stack |
solution |
909 |
Snakes and Ladders |
breadth-first-search |
solution |
90 |
Subsets II |
array backtracking |
solution |
910 |
Smallest Range II |
math greedy |
solution |
911 |
Online Election |
binary-search |
solution |
912 |
Sort an Array |
|
solution |
915 |
Partition Array into Disjoint Intervals |
array |
solution |
916 |
Word Subsets |
string |
solution |
918 |
Maximum Sum Circular Subarray |
array |
solution |
919 |
Complete Binary Tree Inserter |
tree |
solution |
91 |
Decode Ways |
string dynamic-programming |
solution |
921 |
Minimum Add to Make Parentheses Valid |
stack greedy |
solution |
923 |
3Sum With Multiplicity |
two-pointers |
solution |
926 |
Flip String to Monotone Increasing |
array |
solution |
92 |
Reverse Linked List II |
linked-list |
solution |
930 |
Binary Subarrays With Sum |
hash-table two-pointers |
solution |
931 |
Minimum Falling Path Sum |
dynamic-programming |
solution |
932 |
Beautiful Array |
divide-and-conquer |
solution |
934 |
Shortest Bridge |
depth-first-search breadth-first-search |
solution |
935 |
Knight Dialer |
dynamic-programming |
solution |
939 |
Minimum Area Rectangle |
hash-table |
solution |
93 |
Restore IP Addresses |
string backtracking |
solution |
945 |
Minimum Increment to Make Array Unique |
array |
solution |
946 |
Validate Stack Sequences |
stack |
solution |
947 |
Most Stones Removed with Same Row or Column |
depth-first-search union-find |
solution |
948 |
Bag of Tokens |
two-pointers greedy sort |
solution |
949 |
Largest Time for Given Digits |
math |
solution |
94 |
Binary Tree Inorder Traversal |
hash-table stack tree |
solution |
950 |
Reveal Cards In Increasing Order |
array |
solution |
951 |
Flip Equivalent Binary Trees |
tree |
solution |
954 |
Array of Doubled Pairs |
array hash-table |
solution |
955 |
Delete Columns to Make Sorted II |
greedy |
solution |
957 |
Prison Cells After N Days |
hash-table |
solution |
958 |
Check Completeness of a Binary Tree |
tree |
solution |
959 |
Regions Cut By Slashes |
depth-first-search union-find graph |
solution |
95 |
Unique Binary Search Trees II |
dynamic-programming tree |
solution |
962 |
Maximum Width Ramp |
array |
solution |
963 |
Minimum Area Rectangle II |
math geometry |
solution |
966 |
Vowel Spellchecker |
hash-table string |
solution |
967 |
Numbers With Same Consecutive Differences |
depth-first-search breadth-first-search |
solution |
969 |
Pancake Sorting |
array sort |
solution |
96 |
Unique Binary Search Trees |
dynamic-programming tree |
solution |
971 |
Flip Binary Tree To Match Preorder Traversal |
tree depth-first-search |
solution |
973 |
K Closest Points to Origin |
divide-and-conquer heap sort |
solution |
974 |
Subarray Sums Divisible by K |
array hash-table |
solution |
978 |
Longest Turbulent Subarray |
array dynamic-programming sliding-window |
solution |
979 |
Distribute Coins in Binary Tree |
tree depth-first-search |
solution |
981 |
Time Based Key-Value Store |
hash-table binary-search |
solution |
983 |
Minimum Cost For Tickets |
dynamic-programming |
solution |
984 |
String Without AAA or BBB |
greedy |
solution |
986 |
Interval List Intersections |
two-pointers |
solution |
987 |
Vertical Order Traversal of a Binary Tree |
hash-table tree |
solution |
988 |
Smallest String Starting From Leaf |
tree depth-first-search |
solution |
98 |
Validate Binary Search Tree |
tree depth-first-search |
solution |
990 |
Satisfiability of Equality Equations |
union-find graph |
solution |
991 |
Broken Calculator |
math greedy |
solution |
994 |
Rotting Oranges |
breadth-first-search |
solution |
998 |
Maximum Binary Tree II |
tree |
solution |