| 1 |
Two Sum |
Code |
 |
[Array, Hash Table] |
| 2 |
Add Two Numbers |
Code |
 |
[Linked List, Math] |
| 3 |
Longest Substring Without Repeating Characters |
Code |
 |
[Hash Table, Two Pointers, String, Sliding Window] |
| 4 |
Median of Two Sorted Arrays |
Code |
 |
[Array, Binary Search, Divide and Conquer] |
| 5 |
Longest Palindromic Substring |
Code |
 |
[String, Dynamic Programming] |
| 6 |
ZigZag Conversion |
Code |
 |
[String] |
| 7 |
Reverse Integer |
Code |
 |
[Math] |
| 8 |
String to Integer (atoi) |
Code |
 |
[Math, String] |
| 9 |
Palindrome Number |
Code |
 |
[Math] |
| 10 |
Regular Expression Matching |
Code |
 |
[String, Dynamic Programming, Backtracking] |
| 11 |
Container With Most Water |
Code |
 |
[Array, Two Pointers] |
| 12 |
Integer to Roman |
Code |
 |
[Math, String] |
| 13 |
Roman to Integer |
Code |
 |
[Math, String] |
| 14 |
Longest Common Prefix |
Code |
 |
[String] |
| 15 |
3Sum |
Code |
 |
[Array, Two Pointers] |
| 16 |
3Sum Closest |
Code |
 |
[Array, Two Pointers] |
| 17 |
Letter Combinations of a Phone Number |
Code |
 |
[String, Backtracking, Depth-first Search, Recursion] |
| 18 |
4Sum |
Code |
 |
[Array, Hash Table, Two Pointers] |
| 19 |
Remove Nth Node From End of List |
Code |
 |
[Linked List, Two Pointers] |
| 20 |
Valid Parentheses |
Code |
 |
[String, Stack] |
| 21 |
Merge Two Sorted Lists |
Code |
 |
[Linked List] |
| 22 |
Generate Parentheses |
Code |
 |
[String, Backtracking] |
| 23 |
Merge k Sorted Lists |
Code |
 |
[Linked List, Divide and Conquer, Heap] |
| 24 |
Swap Nodes in Pairs |
Code |
 |
[Linked List, Recursion] |
| 25 |
Reverse Nodes in k-Group |
Code |
 |
[Linked List] |
| 26 |
Remove Duplicates from Sorted Array |
Code |
 |
[Array, Two Pointers] |
| 27 |
Remove Element |
Code |
 |
[Array, Two Pointers] |
| 28 |
Implement strStr() |
Code |
 |
[Two Pointers, String] |
| 29 |
Divide Two Integers |
Code |
 |
[Math, Binary Search] |
| 30 |
Substring with Concatenation of All Words |
Code |
 |
[Hash Table, Two Pointers, String] |
| 31 |
Next Permutation |
Code |
 |
[Array] |
| 32 |
Longest Valid Parentheses |
Code |
 |
[String, Dynamic Programming] |
| 33 |
Search in Rotated Sorted Array |
Code |
 |
[Array, Binary Search] |
| 34 |
Find First and Last Position of Element in Sorted Array |
Code |
 |
[Array, Binary Search] |
| 35 |
Search Insert Position |
Code |
 |
[Array, Binary Search] |
| 36 |
Valid Sudoku |
Code |
 |
[Hash Table] |
| 37 |
Sudoku Solver |
Code |
 |
[Hash Table, Backtracking] |
| 38 |
Count and Say |
Code |
 |
[String] |
| 39 |
Combination Sum |
Code |
 |
[Array, Backtracking] |
| 40 |
Combination Sum II |
Code |
 |
[Array, Backtracking] |
| 41 |
First Missing Positive |
Code |
 |
[Array] |
| 42 |
Trapping Rain Water |
Code |
 |
[Array, Two Pointers, Stack] |
| 43 |
Multiply Strings |
Code |
 |
[Math, String] |
| 44 |
Wildcard Matching |
Code |
 |
[String, Dynamic Programming, Backtracking, Greedy] |
| 45 |
Jump Game II |
Code |
 |
[Array, Greedy] |
| 46 |
Permutations |
Code |
 |
[Backtracking] |
| 47 |
Permutations II |
Code |
 |
[Backtracking] |
| 48 |
Rotate Image |
Code |
 |
[Array] |
| 49 |
Group Anagrams |
Code |
 |
[Hash Table, String] |
| 50 |
Pow(x, n) |
Code |
 |
[Math, Binary Search] |
| 51 |
N-Queens |
Code |
 |
[Backtracking] |
| 52 |
N-Queens II |
Code |
 |
[Backtracking] |
| 53 |
Maximum Subarray |
Code |
 |
[Array, Divide and Conquer, Dynamic Programming] |
| 54 |
Spiral Matrix |
Code |
 |
[Array] |
| 55 |
Jump Game |
Code |
 |
[Array, Greedy] |
| 56 |
Merge Intervals |
Code |
 |
[Array, Sort] |
| 57 |
Insert Interval |
Code |
 |
[Array, Sort] |
| 58 |
Length of Last Word |
Code |
 |
[String] |
| 59 |
Spiral Matrix II |
Code |
 |
[Array] |
| 60 |
Permutation Sequence |
Code |
 |
[Math, Backtracking] |
| 61 |
Rotate List |
Code |
 |
[Linked List, Two Pointers] |
| 62 |
Unique Paths |
Code |
 |
[Array, Dynamic Programming] |
| 63 |
Unique Paths II |
Code |
 |
[Array, Dynamic Programming] |
| 64 |
Minimum Path Sum |
Code |
 |
[Array, Dynamic Programming] |
| 65 |
Valid Number |
Code |
 |
[Math, String] |
| 66 |
Plus One |
Code |
 |
[Array] |
| 67 |
Add Binary |
Code |
 |
[Math, String] |
| 68 |
Text Justification |
Code |
 |
[String] |
| 69 |
Sqrt(x) |
Code |
 |
[Math, Binary Search] |
| 70 |
Climbing Stairs |
Code |
 |
[Dynamic Programming] |
| 71 |
Simplify Path |
Code |
 |
[String, Stack] |
| 72 |
Edit Distance |
Code |
 |
[String, Dynamic Programming] |
| 73 |
Set Matrix Zeroes |
Code |
 |
[Array] |
| 74 |
Search a 2D Matrix |
Code |
 |
[Array, Binary Search] |
| 75 |
Sort Colors |
Code |
 |
[Array, Two Pointers, Sort] |
| 76 |
Minimum Window Substring |
Code |
 |
[Hash Table, Two Pointers, String, Sliding Window] |
| 77 |
Combinations |
Code |
 |
[Backtracking] |
| 78 |
Subsets |
Code |
 |
[Array, Backtracking, Bit Manipulation] |
| 79 |
Word Search |
Code |
 |
[Array, Backtracking] |
| 80 |
Remove Duplicates from Sorted Array II |
Code |
 |
[Array, Two Pointers] |
| 81 |
Search in Rotated Sorted Array II |
Code |
 |
[Array, Binary Search] |
| 82 |
Remove Duplicates from Sorted List II |
Code |
 |
[Linked List] |
| 83 |
Remove Duplicates from Sorted List |
Code |
 |
[Linked List] |
| 84 |
Largest Rectangle in Histogram |
Code |
 |
[Array, Stack] |
| 85 |
Maximal Rectangle |
Code |
 |
[Array, Hash Table, Dynamic Programming, Stack] |
| 86 |
Partition List |
Code |
 |
[Linked List, Two Pointers] |
| 87 |
Scramble String |
Code |
 |
[String, Dynamic Programming] |
| 88 |
Merge Sorted Array |
Code |
 |
[Array, Two Pointers] |
| 89 |
Gray Code |
Code |
 |
[Backtracking] |
| 90 |
Subsets II |
Code |
 |
[Array, Backtracking] |
| 91 |
Decode Ways |
Code |
 |
[String, Dynamic Programming] |
| 92 |
Reverse Linked List II |
Code |
 |
[Linked List] |
| 93 |
Restore IP Addresses |
Code |
 |
[String, Backtracking] |
| 94 |
Binary Tree Inorder Traversal |
Code |
 |
[Hash Table, Stack, Tree] |
| 95 |
Unique Binary Search Trees II |
Code |
 |
[Dynamic Programming, Tree] |
| 96 |
Unique Binary Search Trees |
Code |
 |
[Dynamic Programming, Tree] |
| 97 |
Interleaving String |
Code |
 |
[String, Dynamic Programming] |
| 98 |
Validate Binary Search Tree |
Code |
 |
[Tree, Depth-first Search, Recursion] |
| 99 |
Recover Binary Search Tree |
Code |
 |
[Tree, Depth-first Search] |
| 100 |
Same Tree |
Code |
 |
[Tree, Depth-first Search] |
| 101 |
Symmetric Tree |
Code |
 |
[Tree, Depth-first Search, Breadth-first Search] |
| 102 |
Binary Tree Level Order Traversal |
Code |
 |
[Tree, Breadth-first Search] |
| 103 |
Binary Tree Zigzag Level Order Traversal |
Code |
 |
[Stack, Tree, Breadth-first Search] |
| 104 |
Maximum Depth of Binary Tree |
Code |
 |
[Tree, Depth-first Search, Recursion] |
| 105 |
Construct Binary Tree from Preorder and Inorder Traversal |
Code |
 |
[Array, Tree, Depth-first Search] |
| 106 |
Construct Binary Tree from Inorder and Postorder Traversal |
Code |
 |
[Array, Tree, Depth-first Search] |
| 107 |
Binary Tree Level Order Traversal II |
Code |
 |
[Tree, Breadth-first Search] |
| 108 |
Convert Sorted Array to Binary Search Tree |
Code |
 |
[Tree, Depth-first Search] |
| 109 |
Convert Sorted List to Binary Search Tree |
Code |
 |
[Linked List, Depth-first Search] |
| 110 |
Balanced Binary Tree |
Code |
 |
[Tree, Depth-first Search, Recursion] |
| 111 |
Minimum Depth of Binary Tree |
Code |
 |
[Tree, Depth-first Search, Breadth-first Search] |
| 112 |
Path Sum |
Code |
 |
[Tree, Depth-first Search] |
| 113 |
Path Sum II |
Code |
 |
[Tree, Depth-first Search] |
| 114 |
Flatten Binary Tree to Linked List |
Code |
 |
[Tree, Depth-first Search] |
| 115 |
Distinct Subsequences |
Code |
 |
[String, Dynamic Programming] |
| 116 |
Populating Next Right Pointers in Each Node |
Code |
 |
[Tree, Depth-first Search, Breadth-first Search] |
| 117 |
Populating Next Right Pointers in Each Node II |
Code |
 |
[Tree, Depth-first Search] |
| 118 |
Pascal’s Triangle |
Code |
 |
[Array] |
| 119 |
Pascal’s Triangle II |
Code |
 |
[Array] |
| 120 |
Triangle |
Code |
 |
[Array, Dynamic Programming] |
| 121 |
Best Time to Buy and Sell Stock |
Code |
 |
[Array, Dynamic Programming] |
| 122 |
Best Time to Buy and Sell Stock II |
Code |
 |
[Array, Greedy] |
| 123 |
Best Time to Buy and Sell Stock III |
Code |
 |
[Array, Dynamic Programming] |
| 124 |
Binary Tree Maximum Path Sum |
Code |
 |
[Tree, Depth-first Search, Recursion] |
| 125 |
Valid Palindrome |
Code |
 |
[Two Pointers, String] |
| 126 |
Word Ladder II |
Code |
 |
[Array, String, Backtracking, Breadth-first Search] |
| 127 |
Word Ladder |
Code |
 |
[Breadth-first Search] |
| 128 |
Longest Consecutive Sequence |
Code |
 |
[Array, Union Find] |
| 129 |
Sum Root to Leaf Numbers |
Code |
 |
[Tree, Depth-first Search] |
| 130 |
Surrounded Regions |
Code |
 |
[Depth-first Search, Breadth-first Search, Union Find] |
| 131 |
Palindrome Partitioning |
Code |
 |
[Dynamic Programming, Backtracking, Depth-first Search] |
| 132 |
Palindrome Partitioning II |
Code |
 |
[Dynamic Programming] |
| 133 |
Clone Graph |
Code |
 |
[Depth-first Search, Breadth-first Search, Graph] |
| 134 |
Gas Station |
Code |
 |
[Greedy] |
| 135 |
Candy |
Code |
 |
[Greedy] |
| 136 |
Single Number |
Code |
 |
[Hash Table, Bit Manipulation] |
| 137 |
Single Number II |
Code |
 |
[Bit Manipulation] |
| 138 |
Copy List with Random Pointer |
Code |
 |
[Hash Table, Linked List] |
| 139 |
Word Break |
Code |
 |
[Dynamic Programming] |
| 140 |
Word Break II |
Code |
 |
[Dynamic Programming, Backtracking] |
| 141 |
Linked List Cycle |
Code |
 |
[Linked List, Two Pointers] |
| 142 |
Linked List Cycle II |
Code |
 |
[Linked List, Two Pointers] |
| 143 |
Reorder List |
Code |
 |
[Linked List] |
| 144 |
Binary Tree Preorder Traversal |
Code |
 |
[Stack, Tree] |
| 145 |
Binary Tree Postorder Traversal |
Code |
 |
[Stack, Tree] |
| 146 |
LRU Cache |
Code |
 |
[Design] |
| 147 |
Insertion Sort List |
Code |
 |
[Linked List, Sort] |
| 148 |
Sort List |
Code |
 |
[Linked List, Sort] |
| 149 |
Max Points on a Line |
Code |
 |
[Hash Table, Math] |
| 150 |
Evaluate Reverse Polish Notation |
Code |
 |
[Stack] |
| 151 |
Reverse Words in a String |
Code |
 |
[String] |
| 152 |
Maximum Product Subarray |
Code |
 |
[Array, Dynamic Programming] |
| 153 |
Find Minimum in Rotated Sorted Array |
Code |
 |
[Array, Binary Search] |
| 154 |
Find Minimum in Rotated Sorted Array II |
Code |
 |
[Array, Binary Search] |
| 155 |
Min Stack |
Code |
 |
[Stack, Design] |
| 156 |
Binary Tree Upside Down |
Code |
 |
[Tree] |
| 157 |
Read N Characters Given Read4 |
Code |
 |
[String] |
| 158 |
Read N Characters Given Read4 II - Call multiple times |
Code |
 |
[String] |
| 159 |
Longest Substring with At Most Two Distinct Characters |
Code |
 |
[Hash Table, Two Pointers, String, Sliding Window] |
| 160 |
Intersection of Two Linked Lists |
Code |
 |
[Linked List] |
| 161 |
One Edit Distance |
Code |
 |
[String] |
| 162 |
Find Peak Element |
Code |
 |
[Array, Binary Search] |
| 163 |
Missing Ranges |
Code |
 |
[Array] |
| 164 |
Maximum Gap |
Code |
 |
[Sort] |
| 165 |
Compare Version Numbers |
Code |
 |
[String] |
| 166 |
Fraction to Recurring Decimal |
Code |
 |
[Hash Table, Math] |
| 167 |
Two Sum II - Input array is sorted |
Code |
 |
[Array, Two Pointers, Binary Search] |
| 168 |
Excel Sheet Column Title |
Code |
 |
[Math] |
| 169 |
Majority Element |
Code |
 |
[Array, Divide and Conquer, Bit Manipulation] |
| 170 |
Two Sum III - Data structure design |
Code |
 |
[Hash Table, Design] |
| 171 |
Excel Sheet Column Number |
Code |
 |
[Math] |
| 172 |
Factorial Trailing Zeroes |
Code |
 |
[Math] |
| 173 |
Binary Search Tree Iterator |
Code |
 |
[Stack, Tree, Design] |
| 174 |
Dungeon Game |
Code |
 |
[Binary Search, Dynamic Programming] |
| 175 |
Combine Two Tables |
Code |
 |
|
| 176 |
Second Highest Salary |
Code |
 |
|
| 177 |
Nth Highest Salary |
Code |
 |
|
| 178 |
Rank Scores |
Code |
 |
|
| 179 |
Largest Number |
Code |
 |
[Sort] |
| 180 |
Consecutive Numbers |
Code |
 |
|
| 181 |
Employees Earning More Than Their Managers |
Code |
 |
|
| 182 |
Duplicate Emails |
Code |
 |
|
| 183 |
Customers Who Never Order |
Code |
 |
|
| 184 |
Department Highest Salary |
Code |
 |
|
| 185 |
Department Top Three Salaries |
Code |
 |
|
| 186 |
Reverse Words in a String II |
Code |
 |
[String] |
| 187 |
Repeated DNA Sequences |
Code |
 |
[Hash Table, Bit Manipulation] |
| 188 |
Best Time to Buy and Sell Stock IV |
Code |
 |
[Dynamic Programming] |
| 189 |
Rotate Array |
Code |
 |
[Array] |
| 190 |
Reverse Bits |
Code |
 |
[Bit Manipulation] |
| 191 |
Number of 1 Bits |
Code |
 |
[Bit Manipulation] |
| 192 |
Word Frequency |
Code |
 |
|
| 193 |
Valid Phone Numbers |
Code |
 |
|
| 194 |
Transpose File |
Code |
 |
|
| 195 |
Tenth Line |
Code |
 |
|
| 196 |
Delete Duplicate Emails |
Code |
 |
|
| 197 |
Rising Temperature |
Code |
 |
|
| 198 |
House Robber |
Code |
 |
[Dynamic Programming] |
| 199 |
Binary Tree Right Side View |
Code |
 |
[Tree, Depth-first Search, Breadth-first Search] |
| 200 |
Number of Islands |
Code |
 |
[Depth-first Search, Breadth-first Search, Union Find] |
| 201 |
Bitwise AND of Numbers Range |
Code |
 |
[Bit Manipulation] |
| 202 |
Happy Number |
Code |
 |
[Hash Table, Math] |
| 203 |
Remove Linked List Elements |
Code |
 |
[Linked List] |
| 204 |
Count Primes |
Code |
 |
[Hash Table, Math] |
| 205 |
Isomorphic Strings |
Code |
 |
[Hash Table] |
| 206 |
Reverse Linked List |
Code |
 |
[Linked List] |
| 207 |
Course Schedule |
Code |
 |
[Depth-first Search, Breadth-first Search, Graph, Topological Sort] |
| 208 |
Implement Trie (Prefix Tree) |
Code |
 |
[Design, Trie] |
| 209 |
Minimum Size Subarray Sum |
Code |
 |
[Array, Two Pointers, Binary Search] |
| 210 |
Course Schedule II |
Code |
 |
[Depth-first Search, Breadth-first Search, Graph, Topological Sort] |
| 211 |
Design Add and Search Words Data Structure |
Code |
 |
[Backtracking, Depth-first Search, Design, Trie] |
| 212 |
Word Search II |
Code |
 |
[Backtracking, Trie] |
| 213 |
House Robber II |
Code |
 |
[Dynamic Programming] |
| 214 |
Shortest Palindrome |
Code |
 |
[String] |
| 215 |
Kth Largest Element in an Array |
Code |
 |
[Divide and Conquer, Heap] |
| 216 |
Combination Sum III |
Code |
 |
[Array, Backtracking] |
| 217 |
Contains Duplicate |
Code |
 |
[Array, Hash Table] |
| 218 |
The Skyline Problem |
Code |
 |
[Divide and Conquer, Heap, Binary Indexed Tree, Segment Tree, Line Sweep] |
| 219 |
Contains Duplicate II |
Code |
 |
[Array, Hash Table] |
| 220 |
Contains Duplicate III |
Code |
 |
[Sort, Ordered Map] |
| 221 |
Maximal Square |
Code |
 |
[Dynamic Programming] |
| 222 |
Count Complete Tree Nodes |
Code |
 |
[Binary Search, Tree] |
| 223 |
Rectangle Area |
Code |
 |
[Math] |
| 224 |
Basic Calculator |
Code |
 |
[Math, Stack] |
| 225 |
Implement Stack using Queues |
Code |
 |
[Stack, Design] |
| 226 |
Invert Binary Tree |
Code |
 |
[Tree] |
| 227 |
Basic Calculator II |
Code |
 |
[String, Stack] |
| 228 |
Summary Ranges |
Code |
 |
[Array] |
| 229 |
Majority Element II |
Code |
 |
[Array] |
| 230 |
Kth Smallest Element in a BST |
Code |
 |
[Binary Search, Tree] |
| 231 |
Power of Two |
Code |
 |
[Math, Bit Manipulation] |
| 232 |
Implement Queue using Stacks |
Code |
 |
[Stack, Design] |
| 233 |
Number of Digit One |
Code |
 |
[Math] |
| 234 |
Palindrome Linked List |
Code |
 |
[Linked List, Two Pointers] |
| 235 |
Lowest Common Ancestor of a Binary Search Tree |
Code |
 |
[Tree] |
| 236 |
Lowest Common Ancestor of a Binary Tree |
Code |
 |
[Tree] |
| 237 |
Delete Node in a Linked List |
Code |
 |
[Linked List] |
| 238 |
Product of Array Except Self |
Code |
 |
[Array] |
| 239 |
Sliding Window Maximum |
Code |
 |
[Heap, Sliding Window, Dequeue] |
| 240 |
Search a 2D Matrix II |
Code |
 |
[Binary Search, Divide and Conquer] |
| 241 |
Different Ways to Add Parentheses |
Code |
 |
[Divide and Conquer] |
| 242 |
Valid Anagram |
Code |
 |
[Hash Table, Sort] |
| 243 |
Shortest Word Distance |
Code |
 |
[Array] |
| 244 |
Shortest Word Distance II |
Code |
 |
[Hash Table, Design] |
| 245 |
Shortest Word Distance III |
Code |
 |
[Array] |
| 246 |
Strobogrammatic Number |
Code |
 |
[Hash Table, Math] |
| 247 |
Strobogrammatic Number II |
Code |
 |
[Math, Recursion] |
| 248 |
Strobogrammatic Number III |
Code |
 |
[Math, Recursion] |
| 249 |
Group Shifted Strings |
Code |
 |
[Hash Table, String] |
| 250 |
Count Univalue Subtrees |
Code |
 |
[Tree] |
| 251 |
Flatten 2D Vector |
Code |
 |
[Design] |
| 252 |
Meeting Rooms |
Code |
 |
[Sort] |
| 253 |
Meeting Rooms II |
Code |
 |
[Heap, Greedy, Sort] |
| 254 |
Factor Combinations |
Code |
 |
[Backtracking] |
| 255 |
Verify Preorder Sequence in Binary Search Tree |
Code |
 |
[Stack, Tree] |
| 256 |
Paint House |
Code |
 |
[Dynamic Programming] |
| 257 |
Binary Tree Paths |
Code |
 |
[Tree, Depth-first Search] |
| 258 |
Add Digits |
Code |
 |
[Math] |
| 259 |
3Sum Smaller |
Code |
 |
[Array, Two Pointers] |
| 260 |
Single Number III |
Code |
 |
[Bit Manipulation] |
| 261 |
Graph Valid Tree |
Code |
 |
[Depth-first Search, Breadth-first Search, Union Find, Graph] |
| 262 |
Trips and Users |
Code |
 |
|
| 263 |
Ugly Number |
Code |
 |
[Math] |
| 264 |
Ugly Number II |
Code |
 |
[Math, Dynamic Programming, Heap] |
| 265 |
Paint House II |
Code |
 |
[Dynamic Programming] |
| 266 |
Palindrome Permutation |
Code |
 |
[Hash Table] |
| 267 |
Palindrome Permutation II |
Code |
 |
[Backtracking] |
| 268 |
Missing Number |
Code |
 |
[Array, Math, Bit Manipulation] |
| 269 |
Alien Dictionary |
Code |
 |
[Graph, Topological Sort] |
| 270 |
Closest Binary Search Tree Value |
Code |
 |
[Binary Search, Tree] |
| 271 |
Encode and Decode Strings |
Code |
 |
[String] |
| 272 |
Closest Binary Search Tree Value II |
Code |
 |
[Stack, Tree] |
| 273 |
Integer to English Words |
Code |
 |
[Math, String] |
| 274 |
H-Index |
Code |
 |
[Hash Table, Sort] |
| 275 |
H-Index II |
Code |
 |
[Binary Search] |
| 276 |
Paint Fence |
Code |
 |
[Dynamic Programming] |
| 277 |
Find the Celebrity |
Code |
 |
[Array] |
| 278 |
First Bad Version |
Code |
 |
[Binary Search] |
| 279 |
Perfect Squares |
Code |
 |
[Math, Dynamic Programming, Breadth-first Search] |
| 280 |
Wiggle Sort |
Code |
 |
[Array, Sort] |
| 281 |
Zigzag Iterator |
Code |
 |
[Design] |
| 282 |
Expression Add Operators |
Code |
 |
[Divide and Conquer] |
| 283 |
Move Zeroes |
Code |
 |
[Array, Two Pointers] |
| 284 |
Peeking Iterator |
Code |
 |
[Design] |
| 285 |
Inorder Successor in BST |
Code |
 |
[Tree] |
| 286 |
Walls and Gates |
Code |
 |
[Breadth-first Search] |
| 287 |
Find the Duplicate Number |
Code |
 |
[Array, Two Pointers, Binary Search] |
| 288 |
Unique Word Abbreviation |
Code |
 |
[Hash Table, Design] |
| 289 |
Game of Life |
Code |
 |
[Array] |
| 290 |
Word Pattern |
Code |
 |
[Hash Table] |
| 291 |
Word Pattern II |
Code |
 |
[Backtracking] |
| 292 |
Nim Game |
Code |
 |
[Brainteaser, Minimax] |
| 293 |
Flip Game |
Code |
 |
[String] |
| 294 |
Flip Game II |
Code |
 |
[Backtracking, Minimax] |
| 295 |
Find Median from Data Stream |
Code |
 |
[Heap, Design] |
| 296 |
Best Meeting Point |
Code |
 |
[Math, Sort] |
| 297 |
Serialize and Deserialize Binary Tree |
Code |
 |
[Tree, Design] |
| 298 |
Binary Tree Longest Consecutive Sequence |
Code |
 |
[Tree] |
| 299 |
Bulls and Cows |
Code |
 |
[Hash Table] |
| 300 |
Longest Increasing Subsequence |
Code |
 |
[Binary Search, Dynamic Programming] |
| 301 |
Remove Invalid Parentheses |
Code |
 |
[Depth-first Search, Breadth-first Search] |
| 302 |
Smallest Rectangle Enclosing Black Pixels |
Code |
 |
[Binary Search] |
| 303 |
Range Sum Query - Immutable |
Code |
 |
[Dynamic Programming] |
| 304 |
Range Sum Query 2D - Immutable |
Code |
 |
[Dynamic Programming] |
| 305 |
Number of Islands II |
Code |
 |
[Union Find] |
| 306 |
Additive Number |
Code |
 |
[Backtracking] |
| 307 |
Range Sum Query - Mutable |
Code |
 |
[Binary Indexed Tree, Segment Tree] |
| 308 |
Range Sum Query 2D - Mutable |
Code |
 |
[Binary Indexed Tree, Segment Tree] |
| 309 |
Best Time to Buy and Sell Stock with Cooldown |
Code |
 |
[Dynamic Programming] |
| 310 |
Minimum Height Trees |
Code |
 |
[Breadth-first Search, Graph] |
| 311 |
Sparse Matrix Multiplication |
Code |
 |
[Hash Table] |
| 312 |
Burst Balloons |
Code |
 |
[Divide and Conquer, Dynamic Programming] |
| 313 |
Super Ugly Number |
Code |
 |
[Math, Heap] |
| 314 |
Binary Tree Vertical Order Traversal |
Code |
 |
[Depth-first Search, Breadth-first Search] |
| 315 |
Count of Smaller Numbers After Self |
Code |
 |
[Binary Search, Divide and Conquer, Sort, Binary Indexed Tree, Segment Tree] |
| 316 |
Remove Duplicate Letters |
Code |
 |
[String, Stack, Greedy] |
| 317 |
Shortest Distance from All Buildings |
Code |
 |
[Breadth-first Search] |
| 318 |
Maximum Product of Word Lengths |
Code |
 |
[Bit Manipulation] |
| 319 |
Bulb Switcher |
Code |
 |
[Math, Brainteaser] |
| 320 |
Generalized Abbreviation |
Code |
 |
[Backtracking, Bit Manipulation] |
| 321 |
Create Maximum Number |
Code |
 |
[Dynamic Programming, Greedy] |
| 322 |
Coin Change |
Code |
 |
[Dynamic Programming] |
| 323 |
Number of Connected Components in an Undirected Graph |
Code |
 |
[Depth-first Search, Breadth-first Search, Union Find, Graph] |
| 324 |
Wiggle Sort II |
Code |
 |
[Sort] |
| 325 |
Maximum Size Subarray Sum Equals k |
Code |
 |
[Hash Table] |
| 326 |
Power of Three |
Code |
 |
[Math] |
| 327 |
Count of Range Sum |
Code |
 |
[Binary Search, Divide and Conquer, Sort, Binary Indexed Tree, Segment Tree] |
| 328 |
Odd Even Linked List |
Code |
 |
[Linked List] |
| 329 |
Longest Increasing Path in a Matrix |
Code |
 |
[Depth-first Search, Topological Sort, Memoization] |
| 330 |
Patching Array |
Code |
 |
[Greedy] |
| 331 |
Verify Preorder Serialization of a Binary Tree |
Code |
 |
[Stack] |
| 332 |
Reconstruct Itinerary |
Code |
 |
[Depth-first Search, Graph] |
| 333 |
Largest BST Subtree |
Code |
 |
[Tree] |
| 334 |
Increasing Triplet Subsequence |
Code |
 |
|
| 335 |
Self Crossing |
Code |
 |
[Math] |
| 336 |
Palindrome Pairs |
Code |
 |
[Hash Table, String, Trie] |
| 337 |
House Robber III |
Code |
 |
[Dynamic Programming, Tree, Depth-first Search] |
| 338 |
Counting Bits |
Code |
 |
[Dynamic Programming, Bit Manipulation] |
| 339 |
Nested List Weight Sum |
Code |
 |
[Depth-first Search] |
| 340 |
Longest Substring with At Most K Distinct Characters |
Code |
 |
[Hash Table, Two Pointers, String, Sliding Window] |
| 341 |
Flatten Nested List Iterator |
Code |
 |
[Stack, Design] |
| 342 |
Power of Four |
Code |
 |
[Bit Manipulation] |
| 343 |
Integer Break |
Code |
 |
[Math, Dynamic Programming] |
| 344 |
Reverse String |
Code |
 |
[Two Pointers, String] |
| 345 |
Reverse Vowels of a String |
Code |
 |
[Two Pointers, String] |
| 346 |
Moving Average from Data Stream |
Code |
 |
[Design, Queue] |
| 347 |
Top K Frequent Elements |
Code |
 |
[Hash Table, Heap] |
| 348 |
Design Tic-Tac-Toe |
Code |
 |
[Design] |
| 349 |
Intersection of Two Arrays |
Code |
 |
[Hash Table, Two Pointers, Binary Search, Sort] |
| 350 |
Intersection of Two Arrays II |
Code |
 |
[Hash Table, Two Pointers, Binary Search, Sort] |
| 351 |
Android Unlock Patterns |
Code |
 |
[Dynamic Programming, Backtracking] |
| 352 |
Data Stream as Disjoint Intervals |
Code |
 |
[Binary Search, Ordered Map] |
| 353 |
Design Snake Game |
Code |
 |
[Design, Queue] |
| 354 |
Russian Doll Envelopes |
Code |
 |
[Binary Search, Dynamic Programming] |
| 355 |
Design Twitter |
Code |
 |
[Hash Table, Heap, Design] |
| 356 |
Line Reflection |
Code |
 |
[Hash Table, Math] |
| 357 |
Count Numbers with Unique Digits |
Code |
 |
[Math, Dynamic Programming, Backtracking] |
| 358 |
Rearrange String k Distance Apart |
Code |
 |
[Hash Table, Heap, Greedy] |
| 359 |
Logger Rate Limiter |
Code |
 |
[Hash Table, Design] |
| 360 |
Sort Transformed Array |
Code |
 |
[Math, Two Pointers, Sort] |
| 361 |
Bomb Enemy |
Code |
 |
[Dynamic Programming] |
| 362 |
Design Hit Counter |
Code |
 |
[Design] |
| 363 |
Max Sum of Rectangle No Larger Than K |
Code |
 |
[Binary Search, Dynamic Programming, Queue] |
| 364 |
Nested List Weight Sum II |
Code |
 |
[Depth-first Search] |
| 365 |
Water and Jug Problem |
Code |
 |
[Math] |
| 366 |
Find Leaves of Binary Tree |
Code |
 |
[Tree, Depth-first Search] |
| 367 |
Valid Perfect Square |
Code |
 |
[Math, Binary Search] |
| 368 |
Largest Divisible Subset |
Code |
 |
[Math, Dynamic Programming] |
| 369 |
Plus One Linked List |
Code |
 |
[Linked List, Recursion] |
| 370 |
Range Addition |
Code |
 |
[Array] |
| 371 |
Sum of Two Integers |
Code |
 |
[Bit Manipulation] |
| 372 |
Super Pow |
Code |
 |
[Math] |
| 373 |
Find K Pairs with Smallest Sums |
Code |
 |
[Heap] |
| 374 |
Guess Number Higher or Lower |
Code |
 |
[Binary Search] |
| 375 |
Guess Number Higher or Lower II |
Code |
 |
[Dynamic Programming, Minimax] |
| 376 |
Wiggle Subsequence |
Code |
 |
[Dynamic Programming, Greedy] |
| 377 |
Combination Sum IV |
Code |
 |
[Dynamic Programming] |
| 378 |
Kth Smallest Element in a Sorted Matrix |
Code |
 |
[Binary Search, Heap] |
| 379 |
Design Phone Directory |
Code |
 |
[Linked List, Design] |
| 380 |
Insert Delete GetRandom O(1) |
Code |
 |
[Array, Hash Table, Design] |
| 381 |
Insert Delete GetRandom O(1) - Duplicates allowed |
Code |
 |
[Array, Hash Table, Design] |
| 382 |
Linked List Random Node |
Code |
 |
[Reservoir Sampling] |
| 383 |
Ransom Note |
Code |
 |
[String] |
| 384 |
Shuffle an Array |
Code |
 |
|
| 385 |
Mini Parser |
Code |
 |
[String, Stack] |
| 386 |
Lexicographical Numbers |
Code |
 |
|
| 387 |
First Unique Character in a String |
Code |
 |
[Hash Table, String] |
| 388 |
Longest Absolute File Path |
Code |
 |
|
| 389 |
Find the Difference |
Code |
 |
[Hash Table, Bit Manipulation] |
| 390 |
Elimination Game |
Code |
 |
|
| 391 |
Perfect Rectangle |
Code |
 |
[Line Sweep] |
| 392 |
Is Subsequence |
Code |
 |
[Binary Search, Dynamic Programming, Greedy] |
| 393 |
UTF-8 Validation |
Code |
 |
[Bit Manipulation] |
| 394 |
Decode String |
Code |
 |
[Stack, Depth-first Search] |
| 395 |
Longest Substring with At Least K Repeating Characters |
Code |
 |
[Divide and Conquer, Recursion, Sliding Window] |
| 396 |
Rotate Function |
Code |
 |
[Math] |
| 397 |
Integer Replacement |
Code |
 |
[Math, Bit Manipulation] |
| 398 |
Random Pick Index |
Code |
 |
[Reservoir Sampling] |
| 399 |
Evaluate Division |
Code |
 |
[Union Find, Graph] |
| 400 |
Nth Digit |
Code |
 |
[Math] |
| 401 |
Binary Watch |
Code |
 |
[Backtracking, Bit Manipulation] |
| 402 |
Remove K Digits |
Code |
 |
[Stack, Greedy] |
| 403 |
Frog Jump |
Code |
 |
[Dynamic Programming] |
| 404 |
Sum of Left Leaves |
Code |
 |
[Tree] |
| 405 |
Convert a Number to Hexadecimal |
Code |
 |
[Bit Manipulation] |
| 406 |
Queue Reconstruction by Height |
Code |
 |
[Greedy] |
| 407 |
Trapping Rain Water II |
Code |
 |
[Heap, Breadth-first Search] |
| 408 |
Valid Word Abbreviation |
Code |
 |
[String] |
| 409 |
Longest Palindrome |
Code |
 |
[Hash Table] |
| 410 |
Split Array Largest Sum |
Code |
 |
[Binary Search, Dynamic Programming] |
| 411 |
Minimum Unique Word Abbreviation |
Code |
 |
[Backtracking, Bit Manipulation] |
| 412 |
Fizz Buzz |
Code |
 |
|
| 413 |
Arithmetic Slices |
Code |
 |
[Math, Dynamic Programming] |
| 414 |
Third Maximum Number |
Code |
 |
[Array] |
| 415 |
Add Strings |
Code |
 |
[String] |
| 416 |
Partition Equal Subset Sum |
Code |
 |
[Dynamic Programming] |
| 417 |
Pacific Atlantic Water Flow |
Code |
 |
[Depth-first Search, Breadth-first Search] |
| 418 |
Sentence Screen Fitting |
Code |
 |
[Dynamic Programming] |
| 419 |
Battleships in a Board |
Code |
 |
|
| 420 |
Strong Password Checker |
Code |
 |
|
| 421 |
Maximum XOR of Two Numbers in an Array |
Code |
 |
[Bit Manipulation, Trie] |
| 422 |
Valid Word Square |
Code |
 |
|
| 423 |
Reconstruct Original Digits from English |
Code |
 |
[Math] |
| 424 |
Longest Repeating Character Replacement |
Code |
 |
[Two Pointers, Sliding Window] |
| 425 |
Word Squares |
Code |
 |
[Backtracking, Trie] |
| 426 |
Convert Binary Search Tree to Sorted Doubly Linked List |
Code |
 |
[Linked List, Divide and Conquer, Tree] |
| 427 |
Construct Quad Tree |
Code |
 |
|
| 428 |
Serialize and Deserialize N-ary Tree |
Code |
 |
[Tree] |
| 429 |
N-ary Tree Level Order Traversal |
Code |
 |
[Tree, Breadth-first Search] |
| 430 |
Flatten a Multilevel Doubly Linked List |
Code |
 |
[Linked List, Depth-first Search] |
| 431 |
Encode N-ary Tree to Binary Tree |
Code |
 |
[Tree] |
| 432 |
All Oone Data Structure |
Code |
 |
[Design] |
| 433 |
Minimum Genetic Mutation |
Code |
 |
|
| 434 |
Number of Segments in a String |
Code |
 |
[String] |
| 435 |
Non-overlapping Intervals |
Code |
 |
[Greedy] |
| 436 |
Find Right Interval |
Code |
 |
[Binary Search] |
| 437 |
Path Sum III |
Code |
 |
[Tree] |
| 438 |
Find All Anagrams in a String |
Code |
 |
[Hash Table] |
| 439 |
Ternary Expression Parser |
Code |
 |
[Stack, Depth-first Search] |
| 440 |
K-th Smallest in Lexicographical Order |
Code |
 |
|
| 441 |
Arranging Coins |
Code |
 |
[Math, Binary Search] |
| 442 |
Find All Duplicates in an Array |
Code |
 |
[Array] |
| 443 |
String Compression |
Code |
 |
[String] |
| 444 |
Sequence Reconstruction |
Code |
 |
[Graph, Topological Sort] |
| 445 |
Add Two Numbers II |
Code |
 |
[Linked List] |
| 446 |
Arithmetic Slices II - Subsequence |
Code |
 |
[Dynamic Programming] |
| 447 |
Number of Boomerangs |
Code |
 |
[Hash Table, Math] |
| 448 |
Find All Numbers Disappeared in an Array |
Code |
 |
[Array] |
| 449 |
Serialize and Deserialize BST |
Code |
 |
[Tree] |
| 450 |
Delete Node in a BST |
Code |
 |
[Tree] |
| 451 |
Sort Characters By Frequency |
Code |
 |
[Hash Table, Heap] |
| 452 |
Minimum Number of Arrows to Burst Balloons |
Code |
 |
[Greedy, Sort] |
| 453 |
Minimum Moves to Equal Array Elements |
Code |
 |
[Math] |
| 454 |
4Sum II |
Code |
 |
[Hash Table, Binary Search] |
| 455 |
Assign Cookies |
Code |
 |
[Greedy] |
| 456 |
132 Pattern |
Code |
 |
[Stack] |
| 457 |
Circular Array Loop |
Code |
 |
[Array, Two Pointers] |
| 458 |
Poor Pigs |
Code |
 |
[Math] |
| 459 |
Repeated Substring Pattern |
Code |
 |
[String] |
| 460 |
LFU Cache |
Code |
 |
[Design] |
| 461 |
Hamming Distance |
Code |
 |
[Bit Manipulation] |
| 462 |
Minimum Moves to Equal Array Elements II |
Code |
 |
[Math] |
| 463 |
Island Perimeter |
Code |
 |
[Hash Table] |
| 464 |
Can I Win |
Code |
 |
[Dynamic Programming, Minimax] |
| 465 |
Optimal Account Balancing |
Code |
 |
|
| 466 |
Count The Repetitions |
Code |
 |
[Dynamic Programming] |
| 467 |
Unique Substrings in Wraparound String |
Code |
 |
[Dynamic Programming] |
| 468 |
Validate IP Address |
Code |
 |
[String] |
| 469 |
Convex Polygon |
Code |
 |
[Math] |
| 470 |
Implement Rand10() Using Rand7() |
Code |
 |
[Random, Rejection Sampling] |
| 471 |
Encode String with Shortest Length |
Code |
 |
[Dynamic Programming] |
| 472 |
Concatenated Words |
Code |
 |
[Dynamic Programming, Depth-first Search, Trie] |
| 473 |
Matchsticks to Square |
Code |
 |
[Depth-first Search] |
| 474 |
Ones and Zeroes |
Code |
 |
[Dynamic Programming] |
| 475 |
Heaters |
Code |
 |
[Binary Search] |
| 476 |
Number Complement |
Code |
 |
[Bit Manipulation] |
| 477 |
Total Hamming Distance |
Code |
 |
[Bit Manipulation] |
| 478 |
Generate Random Point in a Circle |
Code |
 |
[Math, Random, Rejection Sampling] |
| 479 |
Largest Palindrome Product |
Code |
 |
|
| 480 |
Sliding Window Median |
Code |
 |
[Sliding Window] |
| 481 |
Magical String |
Code |
 |
|
| 482 |
License Key Formatting |
Code |
 |
|
| 483 |
Smallest Good Base |
Code |
 |
[Math, Binary Search] |
| 484 |
Find Permutation |
Code |
 |
[Greedy] |
| 485 |
Max Consecutive Ones |
Code |
 |
[Array] |
| 486 |
Predict the Winner |
Code |
 |
[Dynamic Programming, Minimax] |
| 487 |
Max Consecutive Ones II |
Code |
 |
[Two Pointers] |
| 488 |
Zuma Game |
Code |
 |
[Depth-first Search] |
| 489 |
Robot Room Cleaner |
Code |
 |
[Depth-first Search] |
| 490 |
The Maze |
Code |
 |
[Depth-first Search, Breadth-first Search] |
| 491 |
Increasing Subsequences |
Code |
 |
[Depth-first Search] |
| 492 |
Construct the Rectangle |
Code |
 |
[Math] |
| 493 |
Reverse Pairs |
Code |
 |
[Binary Search, Divide and Conquer, Sort, Binary Indexed Tree, Segment Tree] |
| 494 |
Target Sum |
Code |
 |
[Dynamic Programming, Depth-first Search] |
| 495 |
Teemo Attacking |
Code |
 |
[Array] |
| 496 |
Next Greater Element I |
Code |
 |
[Stack] |
| 497 |
Random Point in Non-overlapping Rectangles |
Code |
 |
[Binary Search, Random] |
| 498 |
Diagonal Traverse |
Code |
 |
|
| 499 |
The Maze III |
Code |
 |
[Depth-first Search, Breadth-first Search] |
| 500 |
Keyboard Row |
Code |
 |
[Hash Table] |
| 501 |
Find Mode in Binary Search Tree |
Code |
 |
[Tree] |
| 502 |
IPO |
Code |
 |
[Heap, Greedy] |
| 503 |
Next Greater Element II |
Code |
 |
[Stack] |
| 504 |
Base 7 |
Code |
 |
|
| 505 |
The Maze II |
Code |
 |
[Depth-first Search, Breadth-first Search] |
| 506 |
Relative Ranks |
Code |
 |
|
| 507 |
Perfect Number |
Code |
 |
[Math] |
| 508 |
Most Frequent Subtree Sum |
Code |
 |
[Hash Table, Tree] |
| 509 |
Fibonacci Number |
Code |
 |
[Array] |
| 510 |
Inorder Successor in BST II |
Code |
 |
[Tree] |
| 511 |
Game Play Analysis I |
Code |
 |
|
| 512 |
Game Play Analysis II |
Code |
 |
|
| 513 |
Find Bottom Left Tree Value |
Code |
 |
[Tree, Depth-first Search, Breadth-first Search] |
| 514 |
Freedom Trail |
Code |
 |
[Divide and Conquer, Dynamic Programming, Depth-first Search] |
| 515 |
Find Largest Value in Each Tree Row |
Code |
 |
[Tree, Depth-first Search, Breadth-first Search] |
| 516 |
Longest Palindromic Subsequence |
Code |
 |
[Dynamic Programming] |
| 517 |
Super Washing Machines |
Code |
 |
[Math, Dynamic Programming] |
| 518 |
Coin Change 2 |
Code |
 |
|
| 519 |
Random Flip Matrix |
Code |
 |
[Random] |
| 520 |
Detect Capital |
Code |
 |
[String] |
| 521 |
Longest Uncommon Subsequence I |
Code |
 |
[String, Brainteaser] |
| 522 |
Longest Uncommon Subsequence II |
Code |
 |
[String] |
| 523 |
Continuous Subarray Sum |
Code |
 |
[Math, Dynamic Programming] |
| 524 |
Longest Word in Dictionary through Deleting |
Code |
 |
[Two Pointers, Sort] |
| 525 |
Contiguous Array |
Code |
 |
[Hash Table] |
| 526 |
Beautiful Arrangement |
Code |
 |
[Backtracking] |
| 527 |
Word Abbreviation |
Code |
 |
[String, Sort] |
| 528 |
Random Pick with Weight |
Code |
 |
[Binary Search, Random] |
| 529 |
Minesweeper |
Code |
 |
[Depth-first Search, Breadth-first Search] |
| 530 |
Minimum Absolute Difference in BST |
Code |
 |
[Tree] |
| 531 |
Lonely Pixel I |
Code |
 |
[Array, Depth-first Search] |
| 532 |
K-diff Pairs in an Array |
Code |
 |
[Array, Two Pointers] |
| 533 |
Lonely Pixel II |
Code |
 |
[Array] |
| 534 |
Game Play Analysis III |
Code |
 |
|
| 535 |
Encode and Decode TinyURL |
Code |
 |
[Hash Table, Math] |
| 536 |
Construct Binary Tree from String |
Code |
 |
[String, Tree] |
| 537 |
Complex Number Multiplication |
Code |
 |
[Math, String] |
| 538 |
Convert BST to Greater Tree |
Code |
 |
[Tree] |
| 539 |
Minimum Time Difference |
Code |
 |
[String] |
| 540 |
Single Element in a Sorted Array |
Code |
 |
[Binary Search] |
| 541 |
Reverse String II |
Code |
 |
[String] |
| 542 |
01 Matrix |
Code |
 |
[Depth-first Search, Breadth-first Search] |
| 543 |
Diameter of Binary Tree |
Code |
 |
[Tree] |
| 544 |
Output Contest Matches |
Code |
 |
[String, Recursion] |
| 545 |
Boundary of Binary Tree |
Code |
 |
[Tree] |
| 546 |
Remove Boxes |
Code |
 |
[Dynamic Programming, Depth-first Search] |
| 547 |
Number of Provinces |
Code |
 |
[Depth-first Search, Union Find] |
| 548 |
Split Array with Equal Sum |
Code |
 |
[Array] |
| 549 |
Binary Tree Longest Consecutive Sequence II |
Code |
 |
[Tree] |
| 550 |
Game Play Analysis IV |
Code |
 |
|
| 551 |
Student Attendance Record I |
Code |
 |
[String] |
| 552 |
Student Attendance Record II |
Code |
 |
[Dynamic Programming] |
| 553 |
Optimal Division |
Code |
 |
[Math, String] |
| 554 |
Brick Wall |
Code |
 |
[Hash Table] |
| 555 |
Split Concatenated Strings |
Code |
 |
[String] |
| 556 |
Next Greater Element III |
Code |
 |
[String] |
| 557 |
Reverse Words in a String III |
Code |
 |
[String] |
| 558 |
Logical OR of Two Binary Grids Represented as Quad-Trees |
Code |
 |
|
| 559 |
Maximum Depth of N-ary Tree |
Code |
 |
[Tree, Depth-first Search, Breadth-first Search] |
| 560 |
Subarray Sum Equals K |
Code |
 |
[Array, Hash Table] |
| 561 |
Array Partition I |
Code |
 |
[Array] |
| 562 |
Longest Line of Consecutive One in Matrix |
Code |
 |
[Array] |
| 563 |
Binary Tree Tilt |
Code |
 |
[Tree, Depth-first Search, Recursion] |
| 564 |
Find the Closest Palindrome |
Code |
 |
[String] |
| 565 |
Array Nesting |
Code |
 |
[Array] |
| 566 |
Reshape the Matrix |
Code |
 |
[Array] |
| 567 |
Permutation in String |
Code |
 |
[Two Pointers, Sliding Window] |
| 568 |
Maximum Vacation Days |
Code |
 |
[Dynamic Programming] |
| 569 |
Median Employee Salary |
Code |
 |
|
| 570 |
Managers with at Least 5 Direct Reports |
Code |
 |
|
| 571 |
Find Median Given Frequency of Numbers |
Code |
 |
|
| 572 |
Subtree of Another Tree |
Code |
 |
[Tree] |
| 573 |
Squirrel Simulation |
Code |
 |
[Math] |
| 574 |
Winning Candidate |
Code |
 |
|
| 575 |
Distribute Candies |
Code |
 |
[Hash Table] |
| 576 |
Out of Boundary Paths |
Code |
 |
[Dynamic Programming, Depth-first Search] |
| 577 |
Employee Bonus |
Code |
 |
|
| 578 |
Get Highest Answer Rate Question |
Code |
 |
|
| 579 |
Find Cumulative Salary of an Employee |
Code |
 |
|
| 580 |
Count Student Number in Departments |
Code |
 |
|
| 581 |
Shortest Unsorted Continuous Subarray |
Code |
 |
[Array] |
| 582 |
Kill Process |
Code |
 |
[Tree, Queue] |
| 583 |
Delete Operation for Two Strings |
Code |
 |
[String] |
| 584 |
Find Customer Referee |
Code |
 |
|
| 585 |
Investments in 2016 |
Code |
 |
|
| 586 |
Customer Placing the Largest Number of Orders |
Code |
 |
|
| 587 |
Erect the Fence |
Code |
 |
[Geometry] |
| 588 |
Design In-Memory File System |
Code |
 |
[Design] |
| 589 |
N-ary Tree Preorder Traversal |
Code |
 |
[Tree] |
| 590 |
N-ary Tree Postorder Traversal |
Code |
 |
[Tree] |
| 591 |
Tag Validator |
Code |
 |
[String, Stack] |
| 592 |
Fraction Addition and Subtraction |
Code |
 |
[Math] |
| 593 |
Valid Square |
Code |
 |
[Math] |
| 594 |
Longest Harmonious Subsequence |
Code |
 |
[Hash Table] |
| 595 |
Big Countries |
Code |
 |
|
| 596 |
Classes More Than 5 Students |
Code |
 |
|
| 597 |
Friend Requests I: Overall Acceptance Rate |
Code |
 |
|
| 598 |
Range Addition II |
Code |
 |
[Math] |
| 599 |
Minimum Index Sum of Two Lists |
Code |
 |
[Hash Table] |
| 600 |
Non-negative Integers without Consecutive Ones |
Code |
 |
[Dynamic Programming] |
| 601 |
Human Traffic of Stadium |
Code |
 |
|
| 602 |
Friend Requests II: Who Has the Most Friends |
Code |
 |
|
| 603 |
Consecutive Available Seats |
Code |
 |
|
| 604 |
Design Compressed String Iterator |
Code |
 |
[Design] |
| 605 |
Can Place Flowers |
Code |
 |
[Array, Greedy] |
| 606 |
Construct String from Binary Tree |
Code |
 |
[String, Tree] |
| 607 |
Sales Person |
Code |
 |
|
| 608 |
Tree Node |
Code |
 |
|
| 609 |
Find Duplicate File in System |
Code |
 |
[Hash Table, String] |
| 610 |
Triangle Judgement |
Code |
 |
|
| 611 |
Valid Triangle Number |
Code |
 |
[Array] |
| 612 |
Shortest Distance in a Plane |
Code |
 |
|
| 613 |
Shortest Distance in a Line |
Code |
 |
|
| 614 |
Second Degree Follower |
Code |
 |
|
| 615 |
Average Salary: Departments VS Company |
Code |
 |
|
| 616 |
Add Bold Tag in String |
Code |
 |
[String] |
| 617 |
Merge Two Binary Trees |
Code |
 |
[Tree] |
| 618 |
Students Report By Geography |
Code |
 |
|
| 619 |
Biggest Single Number |
Code |
 |
|
| 620 |
Not Boring Movies |
Code |
 |
|
| 621 |
Task Scheduler |
Code |
 |
[Array, Greedy, Queue] |
| 622 |
Design Circular Queue |
Code |
 |
[Design, Queue] |
| 623 |
Add One Row to Tree |
Code |
 |
[Tree] |
| 624 |
Maximum Distance in Arrays |
Code |
 |
[Array, Hash Table] |
| 625 |
Minimum Factorization |
Code |
 |
[Math, Recursion] |
| 626 |
Exchange Seats |
Code |
 |
|
| 627 |
Swap Salary |
Code |
 |
|
| 628 |
Maximum Product of Three Numbers |
Code |
 |
[Array, Math] |
| 629 |
K Inverse Pairs Array |
Code |
 |
[Dynamic Programming] |
| 630 |
Course Schedule III |
Code |
 |
[Greedy] |
| 631 |
Design Excel Sum Formula |
Code |
 |
[Design] |
| 632 |
Smallest Range Covering Elements from K Lists |
Code |
 |
[Hash Table, Two Pointers, String] |
| 633 |
Sum of Square Numbers |
Code |
 |
[Math] |
| 634 |
Find the Derangement of An Array |
Code |
 |
[Math] |
| 635 |
Design Log Storage System |
Code |
 |
[String, Design] |
| 636 |
Exclusive Time of Functions |
Code |
 |
[Stack] |
| 637 |
Average of Levels in Binary Tree |
Code |
 |
[Tree] |
| 638 |
Shopping Offers |
Code |
 |
[Dynamic Programming, Depth-first Search] |
| 639 |
Decode Ways II |
Code |
 |
[Dynamic Programming] |
| 640 |
Solve the Equation |
Code |
 |
[Math] |
| 641 |
Design Circular Deque |
Code |
 |
[Design, Queue] |
| 642 |
Design Search Autocomplete System |
Code |
 |
[Design, Trie] |
| 643 |
Maximum Average Subarray I |
Code |
 |
[Array] |
| 644 |
Maximum Average Subarray II |
Code |
 |
[Array, Binary Search] |
| 645 |
Set Mismatch |
Code |
 |
[Hash Table, Math] |
| 646 |
Maximum Length of Pair Chain |
Code |
 |
[Dynamic Programming] |
| 647 |
Palindromic Substrings |
Code |
 |
[String, Dynamic Programming] |
| 648 |
Replace Words |
Code |
 |
[Hash Table, Trie] |
| 649 |
Dota2 Senate |
Code |
 |
[Greedy] |
| 650 |
2 Keys Keyboard |
Code |
 |
[Dynamic Programming] |
| 651 |
4 Keys Keyboard |
Code |
 |
[Math, Dynamic Programming, Greedy] |
| 652 |
Find Duplicate Subtrees |
Code |
 |
[Tree] |
| 653 |
Two Sum IV - Input is a BST |
Code |
 |
[Tree] |
| 654 |
Maximum Binary Tree |
Code |
 |
[Tree] |
| 655 |
Print Binary Tree |
Code |
 |
[Tree] |
| 656 |
Coin Path |
Code |
 |
[Dynamic Programming] |
| 657 |
Robot Return to Origin |
Code |
 |
[String] |
| 658 |
Find K Closest Elements |
Code |
 |
[Binary Search] |
| 659 |
Split Array into Consecutive Subsequences |
Code |
 |
[Heap, Greedy] |
| 660 |
Remove 9 |
Code |
 |
[Math] |
| 661 |
Image Smoother |
Code |
 |
[Array] |
| 662 |
Maximum Width of Binary Tree |
Code |
 |
[Tree] |
| 663 |
Equal Tree Partition |
Code |
 |
[Tree] |
| 664 |
Strange Printer |
Code |
 |
[Dynamic Programming, Depth-first Search] |
| 665 |
Non-decreasing Array |
Code |
 |
[Array] |
| 666 |
Path Sum IV |
Code |
 |
[Tree] |
| 667 |
Beautiful Arrangement II |
Code |
 |
[Array] |
| 668 |
Kth Smallest Number in Multiplication Table |
Code |
 |
[Binary Search] |
| 669 |
Trim a Binary Search Tree |
Code |
 |
[Tree] |
| 670 |
Maximum Swap |
Code |
 |
[Array, Math] |
| 671 |
Second Minimum Node In a Binary Tree |
Code |
 |
[Tree] |
| 672 |
Bulb Switcher II |
Code |
 |
[Math] |
| 673 |
Number of Longest Increasing Subsequence |
Code |
 |
[Dynamic Programming] |
| 674 |
Longest Continuous Increasing Subsequence |
Code |
 |
[Array] |
| 675 |
Cut Off Trees for Golf Event |
Code |
 |
[Breadth-first Search] |
| 676 |
Implement Magic Dictionary |
Code |
 |
[Hash Table, Trie] |
| 677 |
Map Sum Pairs |
Code |
 |
[Trie] |
| 678 |
Valid Parenthesis String |
Code |
 |
[String] |
| 679 |
24 Game |
Code |
 |
[Depth-first Search] |
| 680 |
Valid Palindrome II |
Code |
 |
[String] |
| 681 |
Next Closest Time |
Code |
 |
[String] |
| 682 |
Baseball Game |
Code |
 |
[Stack] |
| 683 |
K Empty Slots |
Code |
 |
[Ordered Map] |
| 684 |
Redundant Connection |
Code |
 |
[Tree, Union Find, Graph] |
| 685 |
Redundant Connection II |
Code |
 |
[Tree, Depth-first Search, Union Find, Graph] |
| 686 |
Repeated String Match |
Code |
 |
[String] |
| 687 |
Longest Univalue Path |
Code |
 |
[Tree, Recursion] |
| 688 |
Knight Probability in Chessboard |
Code |
 |
[Dynamic Programming] |
| 689 |
Maximum Sum of 3 Non-Overlapping Subarrays |
Code |
 |
[Array, Dynamic Programming] |
| 690 |
Employee Importance |
Code |
 |
[Hash Table, Depth-first Search, Breadth-first Search] |
| 691 |
Stickers to Spell Word |
Code |
 |
[Dynamic Programming, Backtracking] |
| 692 |
Top K Frequent Words |
Code |
 |
[Hash Table, Heap, Trie] |
| 693 |
Binary Number with Alternating Bits |
Code |
 |
[Bit Manipulation] |
| 694 |
Number of Distinct Islands |
Code |
 |
[Hash Table, Depth-first Search] |
| 695 |
Max Area of Island |
Code |
 |
[Array, Depth-first Search] |
| 696 |
Count Binary Substrings |
Code |
 |
[String] |
| 697 |
Degree of an Array |
Code |
 |
[Array] |
| 698 |
Partition to K Equal Sum Subsets |
Code |
 |
[Dynamic Programming, Recursion] |
| 699 |
Falling Squares |
Code |
 |
[Segment Tree, Ordered Map] |
| 700 |
Search in a Binary Search Tree |
Code |
 |
[Tree] |
| 701 |
Insert into a Binary Search Tree |
Code |
 |
[Tree] |
| 702 |
Search in a Sorted Array of Unknown Size |
Code |
 |
[Binary Search] |
| 703 |
Kth Largest Element in a Stream |
Code |
 |
[Heap, Design] |
| 704 |
Binary Search |
Code |
 |
[Binary Search] |
| 705 |
Design HashSet |
Code |
 |
[Hash Table, Design] |
| 706 |
Design HashMap |
Code |
 |
[Hash Table, Design] |
| 707 |
Design Linked List |
Code |
 |
[Linked List, Design] |
| 708 |
Insert into a Sorted Circular Linked List |
Code |
 |
[Linked List] |
| 709 |
To Lower Case |
Code |
 |
[String] |
| 710 |
Random Pick with Blacklist |
Code |
 |
[Hash Table, Binary Search, Sort, Random] |
| 711 |
Number of Distinct Islands II |
Code |
 |
[Hash Table, Depth-first Search] |
| 712 |
Minimum ASCII Delete Sum for Two Strings |
Code |
 |
[Dynamic Programming] |
| 713 |
Subarray Product Less Than K |
Code |
 |
[Array, Two Pointers] |
| 714 |
Best Time to Buy and Sell Stock with Transaction Fee |
Code |
 |
[Array, Dynamic Programming, Greedy] |
| 715 |
Range Module |
Code |
 |
[Segment Tree, Ordered Map] |
| 716 |
Max Stack |
Code |
 |
[Design] |
| 717 |
1-bit and 2-bit Characters |
Code |
 |
[Array] |
| 718 |
Maximum Length of Repeated Subarray |
Code |
 |
[Array, Hash Table, Binary Search, Dynamic Programming] |
| 719 |
Find K-th Smallest Pair Distance |
Code |
 |
[Array, Binary Search, Heap] |
| 720 |
Longest Word in Dictionary |
Code |
 |
[Hash Table, Trie] |
| 721 |
Accounts Merge |
Code |
 |
[Depth-first Search, Union Find] |
| 722 |
Remove Comments |
Code |
 |
[String] |
| 723 |
Candy Crush |
Code |
 |
[Array, Two Pointers] |
| 724 |
Find Pivot Index |
Code |
 |
[Array] |
| 725 |
Split Linked List in Parts |
Code |
 |
[Linked List] |
| 726 |
Number of Atoms |
Code |
 |
[Hash Table, Stack, Recursion] |
| 727 |
Minimum Window Subsequence |
Code |
 |
[Dynamic Programming, Sliding Window] |
| 728 |
Self Dividing Numbers |
Code |
 |
[Math] |
| 729 |
My Calendar I |
Code |
 |
[Array] |
| 730 |
Count Different Palindromic Subsequences |
Code |
 |
[String, Dynamic Programming] |
| 731 |
My Calendar II |
Code |
 |
[Ordered Map] |
| 732 |
My Calendar III |
Code |
 |
[Segment Tree, Ordered Map] |
| 733 |
Flood Fill |
Code |
 |
[Depth-first Search] |
| 734 |
Sentence Similarity |
Code |
 |
[Hash Table] |
| 735 |
Asteroid Collision |
Code |
 |
[Stack] |
| 736 |
Parse Lisp Expression |
Code |
 |
[String] |
| 737 |
Sentence Similarity II |
Code |
 |
[Depth-first Search, Union Find] |
| 738 |
Monotone Increasing Digits |
Code |
 |
[Greedy] |
| 739 |
Daily Temperatures |
Code |
 |
[Hash Table, Stack] |
| 740 |
Delete and Earn |
Code |
 |
[Dynamic Programming] |
| 741 |
Cherry Pickup |
Code |
 |
[Dynamic Programming] |
| 742 |
Closest Leaf in a Binary Tree |
Code |
 |
[Tree] |
| 743 |
Network Delay Time |
Code |
 |
[Heap, Depth-first Search, Breadth-first Search, Graph] |
| 744 |
Find Smallest Letter Greater Than Target |
Code |
 |
[Binary Search] |
| 745 |
Prefix and Suffix Search |
Code |
 |
[Trie] |
| 746 |
Min Cost Climbing Stairs |
Code |
 |
[Array, Dynamic Programming] |
| 747 |
Largest Number At Least Twice of Others |
Code |
 |
[Array] |
| 748 |
Shortest Completing Word |
Code |
 |
[Hash Table] |
| 749 |
Contain Virus |
Code |
 |
[Depth-first Search] |
| 750 |
Number Of Corner Rectangles |
Code |
 |
[Dynamic Programming] |
| 751 |
IP to CIDR |
Code |
 |
[Bit Manipulation] |
| 752 |
Open the Lock |
Code |
 |
[Breadth-first Search] |
| 753 |
Cracking the Safe |
Code |
 |
[Math, Depth-first Search] |
| 754 |
Reach a Number |
Code |
 |
[Math] |
| 755 |
Pour Water |
Code |
 |
[Array] |
| 756 |
Pyramid Transition Matrix |
Code |
 |
[Bit Manipulation, Depth-first Search] |
| 757 |
Set Intersection Size At Least Two |
Code |
 |
[Greedy] |
| 758 |
Bold Words in String |
Code |
 |
[String] |
| 759 |
Employee Free Time |
Code |
 |
[Heap, Greedy] |
| 760 |
Find Anagram Mappings |
Code |
 |
[Hash Table] |
| 761 |
Special Binary String |
Code |
 |
[String, Recursion] |
| 762 |
Prime Number of Set Bits in Binary Representation |
Code |
 |
[Bit Manipulation] |
| 763 |
Partition Labels |
Code |
 |
[Two Pointers, Greedy] |
| 764 |
Largest Plus Sign |
Code |
 |
[Dynamic Programming] |
| 765 |
Couples Holding Hands |
Code |
 |
[Greedy, Union Find, Graph] |
| 766 |
Toeplitz Matrix |
Code |
 |
[Array] |
| 767 |
Reorganize String |
Code |
 |
[String, Heap, Greedy, Sort] |
| 768 |
Max Chunks To Make Sorted II |
Code |
 |
[Array] |
| 769 |
Max Chunks To Make Sorted |
Code |
 |
[Array] |
| 770 |
Basic Calculator IV |
Code |
 |
[Hash Table, String, Stack] |
| 771 |
Jewels and Stones |
Code |
 |
[Hash Table] |
| 772 |
Basic Calculator III |
Code |
 |
[String, Stack] |
| 773 |
Sliding Puzzle |
Code |
 |
[Breadth-first Search] |
| 774 |
Minimize Max Distance to Gas Station |
Code |
 |
[Binary Search] |
| 775 |
Global and Local Inversions |
Code |
 |
[Array, Math] |
| 776 |
Split BST |
Code |
 |
[Tree, Recursion] |
| 777 |
Swap Adjacent in LR String |
Code |
 |
[Brainteaser] |
| 778 |
Swim in Rising Water |
Code |
 |
[Binary Search, Heap, Depth-first Search, Union Find] |
| 779 |
K-th Symbol in Grammar |
Code |
 |
[Recursion] |
| 780 |
Reaching Points |
Code |
 |
[Math] |
| 781 |
Rabbits in Forest |
Code |
 |
[Hash Table, Math] |
| 782 |
Transform to Chessboard |
Code |
 |
[Array, Math] |
| 783 |
Minimum Distance Between BST Nodes |
Code |
 |
[Tree, Recursion] |
| 784 |
Letter Case Permutation |
Code |
 |
[Backtracking, Bit Manipulation] |
| 785 |
Is Graph Bipartite? |
Code |
 |
[Depth-first Search, Breadth-first Search, Graph] |
| 786 |
K-th Smallest Prime Fraction |
Code |
 |
[Binary Search, Heap] |
| 787 |
Cheapest Flights Within K Stops |
Code |
 |
[Dynamic Programming, Heap, Breadth-first Search] |
| 788 |
Rotated Digits |
Code |
 |
[String] |
| 789 |
Escape The Ghosts |
Code |
 |
[Math] |
| 790 |
Domino and Tromino Tiling |
Code |
 |
[Dynamic Programming] |
| 791 |
Custom Sort String |
Code |
 |
[String] |
| 792 |
Number of Matching Subsequences |
Code |
 |
[Array] |
| 793 |
Preimage Size of Factorial Zeroes Function |
Code |
 |
[Binary Search] |
| 794 |
Valid Tic-Tac-Toe State |
Code |
 |
[Math, Recursion] |
| 795 |
Number of Subarrays with Bounded Maximum |
Code |
 |
[Array] |
| 796 |
Rotate String |
Code |
 |
|
| 797 |
All Paths From Source to Target |
Code |
 |
[Backtracking, Depth-first Search, Graph] |
| 798 |
Smallest Rotation with Highest Score |
Code |
 |
|
| 799 |
Champagne Tower |
Code |
 |
[Dynamic Programming] |
| 800 |
Similar RGB Color |
Code |
 |
[Math, String] |
| 801 |
Minimum Swaps To Make Sequences Increasing |
Code |
 |
[Dynamic Programming] |
| 802 |
Find Eventual Safe States |
Code |
 |
[Depth-first Search, Graph] |
| 803 |
Bricks Falling When Hit |
Code |
 |
[Union Find] |
| 804 |
Unique Morse Code Words |
Code |
 |
[String] |
| 805 |
Split Array With Same Average |
Code |
 |
[Math] |
| 806 |
Number of Lines To Write String |
Code |
 |
|
| 807 |
Max Increase to Keep City Skyline |
Code |
 |
|
| 808 |
Soup Servings |
Code |
 |
[Dynamic Programming] |
| 809 |
Expressive Words |
Code |
 |
[String] |
| 810 |
Chalkboard XOR Game |
Code |
 |
[Math] |
| 811 |
Subdomain Visit Count |
Code |
 |
[Hash Table] |
| 812 |
Largest Triangle Area |
Code |
 |
[Math] |
| 813 |
Largest Sum of Averages |
Code |
 |
[Dynamic Programming] |
| 814 |
Binary Tree Pruning |
Code |
 |
[Tree] |
| 815 |
Bus Routes |
Code |
 |
[Breadth-first Search] |
| 816 |
Ambiguous Coordinates |
Code |
 |
[String] |
| 817 |
Linked List Components |
Code |
 |
[Linked List] |
| 818 |
Race Car |
Code |
 |
[Dynamic Programming, Heap] |
| 819 |
Most Common Word |
Code |
 |
[String] |
| 820 |
Short Encoding of Words |
Code |
 |
|
| 821 |
Shortest Distance to a Character |
Code |
 |
|
| 822 |
Card Flipping Game |
Code |
 |
|
| 823 |
Binary Trees With Factors |
Code |
 |
|
| 824 |
Goat Latin |
Code |
 |
[String] |
| 825 |
Friends Of Appropriate Ages |
Code |
 |
[Array] |
| 826 |
Most Profit Assigning Work |
Code |
 |
[Two Pointers] |
| 827 |
Making A Large Island |
Code |
 |
[Depth-first Search] |
| 828 |
Count Unique Characters of All Substrings of a Given String |
Code |
 |
[Two Pointers] |
| 829 |
Consecutive Numbers Sum |
Code |
 |
[Math] |
| 830 |
Positions of Large Groups |
Code |
 |
[Array] |
| 831 |
Masking Personal Information |
Code |
 |
[String] |
| 832 |
Flipping an Image |
Code |
 |
[Array] |
| 833 |
Find And Replace in String |
Code |
 |
[String] |
| 834 |
Sum of Distances in Tree |
Code |
 |
[Tree, Depth-first Search] |
| 835 |
Image Overlap |
Code |
 |
[Array] |
| 836 |
Rectangle Overlap |
Code |
 |
[Math] |
| 837 |
New 21 Game |
Code |
 |
[Dynamic Programming] |
| 838 |
Push Dominoes |
Code |
 |
[Two Pointers, Dynamic Programming] |
| 839 |
Similar String Groups |
Code |
 |
[Depth-first Search, Union Find, Graph] |
| 840 |
Magic Squares In Grid |
Code |
 |
[Array] |
| 841 |
Keys and Rooms |
Code |
 |
[Depth-first Search, Graph] |
| 842 |
Split Array into Fibonacci Sequence |
Code |
 |
[String, Backtracking, Greedy] |
| 843 |
Guess the Word |
Code |
 |
[Minimax] |
| 844 |
Backspace String Compare |
Code |
 |
[Two Pointers, Stack] |
| 845 |
Longest Mountain in Array |
Code |
 |
[Two Pointers] |
| 846 |
Hand of Straights |
Code |
 |
[Ordered Map] |
| 847 |
Shortest Path Visiting All Nodes |
Code |
 |
[Dynamic Programming, Breadth-first Search] |
| 848 |
Shifting Letters |
Code |
 |
[String] |
| 849 |
Maximize Distance to Closest Person |
Code |
 |
[Array] |
| 850 |
Rectangle Area II |
Code |
 |
[Segment Tree, Line Sweep] |
| 851 |
Loud and Rich |
Code |
 |
[Depth-first Search] |
| 852 |
Peak Index in a Mountain Array |
Code |
 |
[Binary Search] |
| 853 |
Car Fleet |
Code |
 |
[Sort] |
| 854 |
K-Similar Strings |
Code |
 |
[Breadth-first Search, Graph] |
| 855 |
Exam Room |
Code |
 |
[Ordered Map] |
| 856 |
Score of Parentheses |
Code |
 |
[String, Stack] |
| 857 |
Minimum Cost to Hire K Workers |
Code |
 |
[Heap] |
| 858 |
Mirror Reflection |
Code |
 |
[Math] |
| 859 |
Buddy Strings |
Code |
 |
[String] |
| 860 |
Lemonade Change |
Code |
 |
[Greedy] |
| 861 |
Score After Flipping Matrix |
Code |
 |
[Greedy] |
| 862 |
Shortest Subarray with Sum at Least K |
Code |
 |
[Binary Search, Queue] |
| 863 |
All Nodes Distance K in Binary Tree |
Code |
 |
[Tree, Depth-first Search, Breadth-first Search] |
| 864 |
Shortest Path to Get All Keys |
Code |
 |
[Heap, Breadth-first Search] |
| 865 |
Smallest Subtree with all the Deepest Nodes |
Code |
 |
[Tree, Depth-first Search, Breadth-first Search, Recursion] |
| 866 |
Prime Palindrome |
Code |
 |
[Math] |
| 867 |
Transpose Matrix |
Code |
 |
[Array] |
| 868 |
Binary Gap |
Code |
 |
[Math] |
| 869 |
Reordered Power of 2 |
Code |
 |
[Math] |
| 870 |
Advantage Shuffle |
Code |
 |
[Array, Greedy] |
| 871 |
Minimum Number of Refueling Stops |
Code |
 |
[Dynamic Programming, Heap] |
| 872 |
Leaf-Similar Trees |
Code |
 |
[Tree, Depth-first Search] |
| 873 |
Length of Longest Fibonacci Subsequence |
Code |
 |
[Array, Dynamic Programming] |
| 874 |
Walking Robot Simulation |
Code |
 |
[Greedy] |
| 875 |
Koko Eating Bananas |
Code |
 |
[Binary Search] |
| 876 |
Middle of the Linked List |
Code |
 |
[Linked List] |
| 877 |
Stone Game |
Code |
 |
[Math, Dynamic Programming, Minimax] |
| 878 |
Nth Magical Number |
Code |
 |
[Math, Binary Search] |
| 879 |
Profitable Schemes |
Code |
 |
[Dynamic Programming] |
| 880 |
Decoded String at Index |
Code |
 |
[Stack] |
| 881 |
Boats to Save People |
Code |
 |
[Two Pointers, Greedy] |
| 882 |
Reachable Nodes In Subdivided Graph |
Code |
 |
[Heap] |
| 883 |
Projection Area of 3D Shapes |
Code |
 |
[Math] |
| 884 |
Uncommon Words from Two Sentences |
Code |
 |
[Hash Table] |
| 885 |
Spiral Matrix III |
Code |
 |
[Math] |
| 886 |
Possible Bipartition |
Code |
 |
[Depth-first Search, Graph] |
| 887 |
Super Egg Drop |
Code |
 |
[Math, Binary Search, Dynamic Programming] |
| 888 |
Fair Candy Swap |
Code |
 |
[Array] |
| 889 |
Construct Binary Tree from Preorder and Postorder Traversal |
Code |
 |
[Tree] |
| 890 |
Find and Replace Pattern |
Code |
 |
[String] |
| 891 |
Sum of Subsequence Widths |
Code |
 |
[Array, Math] |
| 892 |
Surface Area of 3D Shapes |
Code |
 |
[Math, Geometry] |
| 893 |
Groups of Special-Equivalent Strings |
Code |
 |
[String] |
| 894 |
All Possible Full Binary Trees |
Code |
 |
[Tree, Recursion] |
| 895 |
Maximum Frequency Stack |
Code |
 |
[Hash Table, Stack] |
| 896 |
Monotonic Array |
Code |
 |
[Array] |
| 897 |
Increasing Order Search Tree |
Code |
 |
[Tree, Depth-first Search, Recursion] |
| 898 |
Bitwise ORs of Subarrays |
Code |
 |
[Dynamic Programming, Bit Manipulation] |
| 899 |
Orderly Queue |
Code |
 |
[Math, String] |
| 900 |
RLE Iterator |
Code |
 |
[Array] |
| 901 |
Online Stock Span |
Code |
 |
[Stack] |
| 902 |
Numbers At Most N Given Digit Set |
Code |
 |
[Math, Dynamic Programming] |
| 903 |
Valid Permutations for DI Sequence |
Code |
 |
[Divide and Conquer, Dynamic Programming] |
| 904 |
Fruit Into Baskets |
Code |
 |
[Two Pointers] |
| 905 |
Sort Array By Parity |
Code |
 |
[Array] |
| 906 |
Super Palindromes |
Code |
 |
[Math] |
| 907 |
Sum of Subarray Minimums |
Code |
 |
[Array, Stack] |
| 908 |
Smallest Range I |
Code |
 |
[Math] |
| 909 |
Snakes and Ladders |
Code |
 |
[Breadth-first Search] |
| 910 |
Smallest Range II |
Code |
 |
[Math, Greedy] |
| 911 |
Online Election |
Code |
 |
[Binary Search] |
| 912 |
Sort an Array |
Code |
 |
|
| 913 |
Cat and Mouse |
Code |
 |
[Breadth-first Search, Minimax] |
| 914 |
X of a Kind in a Deck of Cards |
Code |
 |
[Array, Math] |
| 915 |
Partition Array into Disjoint Intervals |
Code |
 |
[Array] |
| 916 |
Word Subsets |
Code |
 |
[String] |
| 917 |
Reverse Only Letters |
Code |
 |
[String] |
| 918 |
Maximum Sum Circular Subarray |
Code |
 |
[Array] |
| 919 |
Complete Binary Tree Inserter |
Code |
 |
[Tree] |
| 920 |
Number of Music Playlists |
Code |
 |
[Dynamic Programming] |
| 921 |
Minimum Add to Make Parentheses Valid |
Code |
 |
[Stack, Greedy] |
| 922 |
Sort Array By Parity II |
Code |
 |
[Array, Sort] |
| 923 |
3Sum With Multiplicity |
Code |
 |
[Two Pointers] |
| 924 |
Minimize Malware Spread |
Code |
 |
[Depth-first Search, Union Find] |
| 925 |
Long Pressed Name |
Code |
 |
[Two Pointers, String] |
| 926 |
Flip String to Monotone Increasing |
Code |
 |
[Array] |
| 927 |
Three Equal Parts |
Code |
 |
[Math, Binary Search, Greedy] |
| 928 |
Minimize Malware Spread II |
Code |
 |
[Depth-first Search, Union Find, Graph] |
| 929 |
Unique Email Addresses |
Code |
 |
[String] |
| 930 |
Binary Subarrays With Sum |
Code |
 |
[Hash Table, Two Pointers] |
| 931 |
Minimum Falling Path Sum |
Code |
 |
[Dynamic Programming] |
| 932 |
Beautiful Array |
Code |
 |
[Divide and Conquer] |
| 933 |
Number of Recent Calls |
Code |
 |
[Queue] |
| 934 |
Shortest Bridge |
Code |
 |
[Depth-first Search, Breadth-first Search] |
| 935 |
Knight Dialer |
Code |
 |
[Dynamic Programming] |
| 936 |
Stamping The Sequence |
Code |
 |
[String, Greedy] |
| 937 |
Reorder Data in Log Files |
Code |
 |
[String] |
| 938 |
Range Sum of BST |
Code |
 |
[Tree, Depth-first Search, Recursion] |
| 939 |
Minimum Area Rectangle |
Code |
 |
[Hash Table] |
| 940 |
Distinct Subsequences II |
Code |
 |
[Dynamic Programming] |
| 941 |
Valid Mountain Array |
Code |
 |
[Array] |
| 942 |
DI String Match |
Code |
 |
[Math] |
| 943 |
Find the Shortest Superstring |
Code |
 |
[Dynamic Programming] |
| 944 |
Delete Columns to Make Sorted |
Code |
 |
[Greedy] |
| 945 |
Minimum Increment to Make Array Unique |
Code |
 |
[Array] |
| 946 |
Validate Stack Sequences |
Code |
 |
[Stack] |
| 947 |
Most Stones Removed with Same Row or Column |
Code |
 |
[Depth-first Search, Union Find] |
| 948 |
Bag of Tokens |
Code |
 |
[Two Pointers, Greedy, Sort] |
| 949 |
Largest Time for Given Digits |
Code |
 |
[Math] |
| 950 |
Reveal Cards In Increasing Order |
Code |
 |
[Array] |
| 951 |
Flip Equivalent Binary Trees |
Code |
 |
[Tree] |
| 952 |
Largest Component Size by Common Factor |
Code |
 |
[Math, Union Find] |
| 953 |
Verifying an Alien Dictionary |
Code |
 |
[Hash Table] |
| 954 |
Array of Doubled Pairs |
Code |
 |
[Array, Hash Table] |
| 955 |
Delete Columns to Make Sorted II |
Code |
 |
[Greedy] |
| 956 |
Tallest Billboard |
Code |
 |
[Dynamic Programming] |
| 957 |
Prison Cells After N Days |
Code |
 |
[Hash Table] |
| 958 |
Check Completeness of a Binary Tree |
Code |
 |
[Tree] |
| 959 |
Regions Cut By Slashes |
Code |
 |
[Depth-first Search, Union Find, Graph] |
| 960 |
Delete Columns to Make Sorted III |
Code |
 |
[Dynamic Programming] |
| 961 |
N-Repeated Element in Size 2N Array |
Code |
 |
[Hash Table] |
| 962 |
Maximum Width Ramp |
Code |
 |
[Array] |
| 963 |
Minimum Area Rectangle II |
Code |
 |
[Math, Geometry] |
| 964 |
Least Operators to Express Number |
Code |
 |
[Math, Dynamic Programming] |
| 965 |
Univalued Binary Tree |
Code |
 |
[Tree] |
| 966 |
Vowel Spellchecker |
Code |
 |
[Hash Table, String] |
| 967 |
Numbers With Same Consecutive Differences |
Code |
 |
[Backtracking, Depth-first Search, Breadth-first Search, Recursion] |
| 968 |
Binary Tree Cameras |
Code |
 |
[Dynamic Programming, Tree, Depth-first Search] |
| 969 |
Pancake Sorting |
Code |
 |
[Array, Sort] |
| 970 |
Powerful Integers |
Code |
 |
[Hash Table, Math] |
| 971 |
Flip Binary Tree To Match Preorder Traversal |
Code |
 |
[Tree, Depth-first Search] |
| 972 |
Equal Rational Numbers |
Code |
 |
[Math] |
| 973 |
K Closest Points to Origin |
Code |
 |
[Divide and Conquer, Heap, Sort] |
| 974 |
Subarray Sums Divisible by K |
Code |
 |
[Array, Hash Table] |
| 975 |
Odd Even Jump |
Code |
 |
[Dynamic Programming, Stack, Ordered Map] |
| 976 |
Largest Perimeter Triangle |
Code |
 |
[Math, Sort] |
| 977 |
Squares of a Sorted Array |
Code |
 |
[Array, Two Pointers] |
| 978 |
Longest Turbulent Subarray |
Code |
 |
[Array, Dynamic Programming, Sliding Window] |
| 979 |
Distribute Coins in Binary Tree |
Code |
 |
[Tree, Depth-first Search] |
| 980 |
Unique Paths III |
Code |
 |
[Backtracking, Depth-first Search] |
| 981 |
Time Based Key-Value Store |
Code |
 |
[Hash Table, Binary Search] |
| 982 |
Triples with Bitwise AND Equal To Zero |
Code |
 |
[Dynamic Programming] |
| 983 |
Minimum Cost For Tickets |
Code |
 |
[Dynamic Programming] |
| 984 |
String Without AAA or BBB |
Code |
 |
[Greedy] |
| 985 |
Sum of Even Numbers After Queries |
Code |
 |
[Array] |
| 986 |
Interval List Intersections |
Code |
 |
[Two Pointers] |
| 987 |
Vertical Order Traversal of a Binary Tree |
Code |
 |
[Hash Table, Tree] |
| 988 |
Smallest String Starting From Leaf |
Code |
 |
[Tree, Depth-first Search] |
| 989 |
Add to Array-Form of Integer |
Code |
 |
[Array] |
| 990 |
Satisfiability of Equality Equations |
Code |
 |
[Union Find, Graph] |
| 991 |
Broken Calculator |
Code |
 |
[Math, Greedy] |
| 992 |
Subarrays with K Different Integers |
Code |
 |
[Hash Table, Two Pointers, Sliding Window] |
| 993 |
Cousins in Binary Tree |
Code |
 |
[Tree, Breadth-first Search] |
| 994 |
Rotting Oranges |
Code |
 |
[Breadth-first Search] |
| 995 |
Minimum Number of K Consecutive Bit Flips |
Code |
 |
[Greedy, Sliding Window] |
| 996 |
Number of Squareful Arrays |
Code |
 |
[Math, Backtracking, Graph] |
| 997 |
Find the Town Judge |
Code |
 |
[Graph] |
| 998 |
Maximum Binary Tree II |
Code |
 |
[Tree] |
| 999 |
Available Captures for Rook |
Code |
 |
[Array] |
| 1000 |
Minimum Cost to Merge Stones |
Code |
 |
[Dynamic Programming] |
| 1001 |
Grid Illumination |
Code |
 |
[Hash Table] |
| 1002 |
Find Common Characters |
Code |
 |
[Array, Hash Table] |
| 1003 |
Check If Word Is Valid After Substitutions |
Code |
 |
[String, Stack] |
| 1004 |
Max Consecutive Ones III |
Code |
 |
[Two Pointers, Sliding Window] |
| 1005 |
Maximize Sum Of Array After K Negations |
Code |
 |
[Greedy] |
| 1006 |
Clumsy Factorial |
Code |
 |
[Math] |
| 1007 |
Minimum Domino Rotations For Equal Row |
Code |
 |
[Array, Greedy] |
| 1008 |
Construct Binary Search Tree from Preorder Traversal |
Code |
 |
[Tree] |
| 1009 |
Complement of Base 10 Integer |
Code |
 |
[Math] |
| 1010 |
Pairs of Songs With Total Durations Divisible by 60 |
Code |
 |
[Array] |
| 1011 |
Capacity To Ship Packages Within D Days |
Code |
 |
[Array, Binary Search] |
| 1012 |
Numbers With Repeated Digits |
Code |
 |
[Math, Dynamic Programming] |
| 1013 |
Partition Array Into Three Parts With Equal Sum |
Code |
 |
[Array] |
| 1014 |
Best Sightseeing Pair |
Code |
 |
[Array] |
| 1015 |
Smallest Integer Divisible by K |
Code |
 |
[Math] |
| 1016 |
Binary String With Substrings Representing 1 To N |
Code |
 |
[String] |
| 1017 |
Convert to Base -2 |
Code |
 |
[Math] |
| 1018 |
Binary Prefix Divisible By 5 |
Code |
 |
[Array] |
| 1019 |
Next Greater Node In Linked List |
Code |
 |
[Linked List, Stack] |
| 1020 |
Number of Enclaves |
Code |
 |
[Depth-first Search] |
| 1021 |
Remove Outermost Parentheses |
Code |
 |
[Stack] |
| 1022 |
Sum of Root To Leaf Binary Numbers |
Code |
 |
[Tree] |
| 1023 |
Camelcase Matching |
Code |
 |
[String, Trie] |
| 1024 |
Video Stitching |
Code |
 |
[Dynamic Programming] |
| 1025 |
Divisor Game |
Code |
 |
[Math, Dynamic Programming] |
| 1026 |
Maximum Difference Between Node and Ancestor |
Code |
 |
[Tree, Depth-first Search] |
| 1027 |
Longest Arithmetic Subsequence |
Code |
 |
[Dynamic Programming] |
| 1028 |
Recover a Tree From Preorder Traversal |
Code |
 |
[Tree, Depth-first Search] |
| 1029 |
Two City Scheduling |
Code |
 |
[Greedy] |
| 1030 |
Matrix Cells in Distance Order |
Code |
 |
[Sort] |
| 1031 |
Maximum Sum of Two Non-Overlapping Subarrays |
Code |
 |
[Array] |
| 1032 |
Stream of Characters |
Code |
 |
[Trie] |
| 1033 |
Moving Stones Until Consecutive |
Code |
 |
[Brainteaser] |
| 1034 |
Coloring A Border |
Code |
 |
[Depth-first Search] |
| 1035 |
Uncrossed Lines |
Code |
 |
[Array] |
| 1036 |
Escape a Large Maze |
Code |
 |
[Breadth-first Search] |
| 1037 |
Valid Boomerang |
Code |
 |
[Math] |
| 1038 |
Binary Search Tree to Greater Sum Tree |
Code |
 |
[Binary Search Tree] |
| 1039 |
Minimum Score Triangulation of Polygon |
Code |
 |
[Dynamic Programming] |
| 1040 |
Moving Stones Until Consecutive II |
Code |
 |
[Array, Sliding Window] |
| 1041 |
Robot Bounded In Circle |
Code |
 |
[Math] |
| 1042 |
Flower Planting With No Adjacent |
Code |
 |
[Graph] |
| 1043 |
Partition Array for Maximum Sum |
Code |
 |
[Dynamic Programming] |
| 1044 |
Longest Duplicate Substring |
Code |
 |
[Hash Table, Binary Search, Suffix Array] |
| 1045 |
Customers Who Bought All Products |
Code |
 |
|
| 1046 |
Last Stone Weight |
Code |
 |
[Heap, Greedy] |
| 1047 |
Remove All Adjacent Duplicates In String |
Code |
 |
[Stack] |
| 1048 |
Longest String Chain |
Code |
 |
[Hash Table, Dynamic Programming] |
| 1049 |
Last Stone Weight II |
Code |
 |
[Dynamic Programming] |
| 1050 |
Actors and Directors Who Cooperated At Least Three Times |
Code |
 |
|
| 1051 |
Height Checker |
Code |
 |
[Array] |
| 1052 |
Grumpy Bookstore Owner |
Code |
 |
[Array, Sliding Window] |
| 1053 |
Previous Permutation With One Swap |
Code |
 |
[Array, Greedy] |
| 1054 |
Distant Barcodes |
Code |
 |
[Heap, Sort] |
| 1055 |
Shortest Way to Form String |
Code |
 |
[Dynamic Programming, Greedy] |
| 1056 |
Confusing Number |
Code |
 |
[Math] |
| 1057 |
Campus Bikes |
Code |
 |
[Greedy, Sort] |
| 1058 |
Minimize Rounding Error to Meet Target |
Code |
 |
[Math, Dynamic Programming, Greedy] |
| 1059 |
All Paths from Source Lead to Destination |
Code |
 |
[Depth-first Search, Graph] |
| 1060 |
Missing Element in Sorted Array |
Code |
 |
[Binary Search] |
| 1061 |
Lexicographically Smallest Equivalent String |
Code |
 |
[Depth-first Search, Union Find] |
| 1062 |
Longest Repeating Substring |
Code |
 |
[String] |
| 1063 |
Number of Valid Subarrays |
Code |
 |
[Stack] |
| 1064 |
Fixed Point |
Code |
 |
[Array, Binary Search] |
| 1065 |
Index Pairs of a String |
Code |
 |
[String, Trie] |
| 1066 |
Campus Bikes II |
Code |
 |
[Dynamic Programming, Backtracking] |
| 1067 |
Digit Count in Range |
Code |
 |
[Math, Dynamic Programming] |
| 1068 |
Product Sales Analysis I |
Code |
 |
|
| 1069 |
Product Sales Analysis II |
Code |
 |
|
| 1070 |
Product Sales Analysis III |
Code |
 |
|
| 1071 |
Greatest Common Divisor of Strings |
Code |
 |
[String] |
| 1072 |
Flip Columns For Maximum Number of Equal Rows |
Code |
 |
[Hash Table] |
| 1073 |
Adding Two Negabinary Numbers |
Code |
 |
[Math] |
| 1074 |
Number of Submatrices That Sum to Target |
Code |
 |
[Array, Dynamic Programming, Sliding Window] |
| 1075 |
Project Employees I |
Code |
 |
|
| 1076 |
Project Employees II |
Code |
 |
|
| 1077 |
Project Employees III |
Code |
 |
|
| 1078 |
Occurrences After Bigram |
Code |
 |
[Hash Table] |
| 1079 |
Letter Tile Possibilities |
Code |
 |
[Backtracking] |
| 1080 |
Insufficient Nodes in Root to Leaf Paths |
Code |
 |
[Depth-first Search] |
| 1081 |
Smallest Subsequence of Distinct Characters |
Code |
 |
[String, Stack, Greedy] |
| 1082 |
Sales Analysis I |
Code |
 |
|
| 1083 |
Sales Analysis II |
Code |
 |
|
| 1084 |
Sales Analysis III |
Code |
 |
|
| 1085 |
Sum of Digits in the Minimum Number |
Code |
 |
[Array] |
| 1086 |
High Five |
Code |
 |
[Array, Hash Table, Sort] |
| 1087 |
Brace Expansion |
Code |
 |
[Backtracking] |
| 1088 |
Confusing Number II |
Code |
 |
[Math, Backtracking] |
| 1089 |
Duplicate Zeros |
Code |
 |
[Array] |
| 1090 |
Largest Values From Labels |
Code |
 |
[Hash Table, Greedy] |
| 1091 |
Shortest Path in Binary Matrix |
Code |
 |
[Breadth-first Search] |
| 1092 |
Shortest Common Supersequence |
Code |
 |
[Dynamic Programming] |
| 1093 |
Statistics from a Large Sample |
Code |
 |
[Math, Two Pointers] |
| 1094 |
Car Pooling |
Code |
 |
[Greedy] |
| 1095 |
Find in Mountain Array |
Code |
 |
[Binary Search] |
| 1096 |
Brace Expansion II |
Code |
 |
[String] |
| 1097 |
Game Play Analysis V |
Code |
 |
|
| 1098 |
Unpopular Books |
Code |
 |
|
| 1099 |
Two Sum Less Than K |
Code |
 |
[Array, Two Pointers, Sort] |
| 1100 |
Find K-Length Substrings With No Repeated Characters |
Code |
 |
[String, Sliding Window] |
| 1101 |
The Earliest Moment When Everyone Become Friends |
Code |
 |
[Union Find] |
| 1102 |
Path With Maximum Minimum Value |
Code |
 |
[Depth-first Search, Union Find, Graph] |
| 1103 |
Distribute Candies to People |
Code |
 |
[Math] |
| 1104 |
Path In Zigzag Labelled Binary Tree |
Code |
 |
[Math, Tree] |
| 1105 |
Filling Bookcase Shelves |
Code |
 |
[Dynamic Programming] |
| 1106 |
Parsing A Boolean Expression |
Code |
 |
[String] |
| 1107 |
New Users Daily Count |
Code |
 |
|
| 1108 |
Defanging an IP Address |
Code |
 |
[String] |
| 1109 |
Corporate Flight Bookings |
Code |
 |
[Array, Math] |
| 1110 |
Delete Nodes And Return Forest |
Code |
 |
[Tree, Depth-first Search] |
| 1111 |
Maximum Nesting Depth of Two Valid Parentheses Strings |
Code |
 |
[Binary Search, Greedy] |
| 1112 |
Highest Grade For Each Student |
Code |
 |
|
| 1113 |
Reported Posts |
Code |
 |
|
| 1114 |
Print in Order |
Code |
 |
|
| 1115 |
Print FooBar Alternately |
Code |
 |
|
| 1116 |
Print Zero Even Odd |
Code |
 |
|
| 1117 |
Building H2O |
Code |
 |
|
| 1118 |
Number of Days in a Month |
Code |
 |
|
| 1119 |
Remove Vowels from a String |
Code |
 |
[String] |
| 1120 |
Maximum Average Subtree |
Code |
 |
[Tree] |
| 1121 |
Divide Array Into Increasing Sequences |
Code |
 |
[Math] |
| 1122 |
Relative Sort Array |
Code |
 |
[Array, Sort] |
| 1123 |
Lowest Common Ancestor of Deepest Leaves |
Code |
 |
[Tree, Depth-first Search] |
| 1124 |
Longest Well-Performing Interval |
Code |
 |
[Stack] |
| 1125 |
Smallest Sufficient Team |
Code |
 |
[Dynamic Programming, Bit Manipulation] |
| 1126 |
Active Businesses |
Code |
 |
|
| 1127 |
User Purchase Platform |
Code |
 |
|
| 1128 |
Number of Equivalent Domino Pairs |
Code |
 |
[Array] |
| 1129 |
Shortest Path with Alternating Colors |
Code |
 |
[Breadth-first Search, Graph] |
| 1130 |
Minimum Cost Tree From Leaf Values |
Code |
 |
[Dynamic Programming, Stack, Tree] |
| 1131 |
Maximum of Absolute Value Expression |
Code |
 |
[Math, Bit Manipulation] |
| 1132 |
Reported Posts II |
Code |
 |
|
| 1133 |
Largest Unique Number |
Code |
 |
[Array, Hash Table] |
| 1134 |
Armstrong Number |
Code |
 |
[Math] |
| 1135 |
Connecting Cities With Minimum Cost |
Code |
 |
[Union Find, Graph] |
| 1136 |
Parallel Courses |
Code |
 |
[Dynamic Programming, Depth-first Search, Graph] |
| 1137 |
N-th Tribonacci Number |
Code |
 |
[Recursion] |
| 1138 |
Alphabet Board Path |
Code |
 |
[Hash Table, String] |
| 1139 |
Largest 1-Bordered Square |
Code |
 |
[Dynamic Programming] |
| 1140 |
Stone Game II |
Code |
 |
[Dynamic Programming] |
| 1141 |
User Activity for the Past 30 Days I |
Code |
 |
|
| 1142 |
User Activity for the Past 30 Days II |
Code |
 |
|
| 1143 |
Longest Common Subsequence |
Code |
 |
[Dynamic Programming] |
| 1144 |
Decrease Elements To Make Array Zigzag |
Code |
 |
[Array] |
| 1145 |
Binary Tree Coloring Game |
Code |
 |
[Tree, Depth-first Search] |
| 1146 |
Snapshot Array |
Code |
 |
[Array] |
| 1147 |
Longest Chunked Palindrome Decomposition |
Code |
 |
[Dynamic Programming, Rolling Hash] |
| 1148 |
Article Views I |
Code |
 |
|
| 1149 |
Article Views II |
Code |
 |
|
| 1150 |
Check If a Number Is Majority Element in a Sorted Array |
Code |
 |
[Array, Binary Search] |
| 1151 |
Minimum Swaps to Group All 1’s Together |
Code |
 |
[Array, Sliding Window] |
| 1152 |
Analyze User Website Visit Pattern |
Code |
 |
[Array, Hash Table, Sort] |
| 1153 |
String Transforms Into Another String |
Code |
 |
[Graph] |
| 1154 |
Day of the Year |
Code |
 |
[Math] |
| 1155 |
Number of Dice Rolls With Target Sum |
Code |
 |
[Dynamic Programming] |
| 1156 |
Swap For Longest Repeated Character Substring |
Code |
 |
[String] |
| 1157 |
Online Majority Element In Subarray |
Code |
 |
[Array, Binary Search, Segment Tree] |
| 1158 |
Market Analysis I |
Code |
 |
|
| 1159 |
Market Analysis II |
Code |
 |
|
| 1160 |
Find Words That Can Be Formed by Characters |
Code |
 |
[Array, Hash Table] |
| 1161 |
Maximum Level Sum of a Binary Tree |
Code |
 |
[Tree, Breadth-first Search] |
| 1162 |
As Far from Land as Possible |
Code |
 |
[Breadth-first Search, Graph] |
| 1163 |
Last Substring in Lexicographical Order |
Code |
 |
[String, Suffix Array] |
| 1164 |
Product Price at a Given Date |
Code |
 |
|
| 1165 |
Single-Row Keyboard |
Code |
 |
[String] |
| 1166 |
Design File System |
Code |
 |
[Hash Table, Design] |
| 1167 |
Minimum Cost to Connect Sticks |
Code |
 |
[Greedy] |
| 1168 |
Optimize Water Distribution in a Village |
Code |
 |
[Union Find, Graph] |
| 1169 |
Invalid Transactions |
Code |
 |
[Array, String] |
| 1170 |
Compare Strings by Frequency of the Smallest Character |
Code |
 |
[Array, String] |
| 1171 |
Remove Zero Sum Consecutive Nodes from Linked List |
Code |
 |
[Linked List] |
| 1172 |
Dinner Plate Stacks |
Code |
 |
[Design] |
| 1173 |
Immediate Food Delivery I |
Code |
 |
|
| 1174 |
Immediate Food Delivery II |
Code |
 |
|
| 1175 |
Prime Arrangements |
Code |
 |
[Math] |
| 1176 |
Diet Plan Performance |
Code |
 |
[Array, Sliding Window] |
| 1177 |
Can Make Palindrome from Substring |
Code |
 |
[Array, String] |
| 1178 |
Number of Valid Words for Each Puzzle |
Code |
 |
[Hash Table, Bit Manipulation] |
| 1179 |
Reformat Department Table |
Code |
 |
|
| 1180 |
Count Substrings with Only One Distinct Letter |
Code |
 |
[Math, String] |
| 1181 |
Before and After Puzzle |
Code |
 |
[String] |
| 1182 |
Shortest Distance to Target Color |
Code |
 |
[Binary Search] |
| 1183 |
Maximum Number of Ones |
Code |
 |
[Math, Sort] |
| 1184 |
Distance Between Bus Stops |
Code |
 |
[Array] |
| 1185 |
Day of the Week |
Code |
 |
[Array] |
| 1186 |
Maximum Subarray Sum with One Deletion |
Code |
 |
[Dynamic Programming] |
| 1187 |
Make Array Strictly Increasing |
Code |
 |
[Dynamic Programming] |
| 1188 |
Design Bounded Blocking Queue |
Code |
 |
|
| 1189 |
Maximum Number of Balloons |
Code |
 |
[Hash Table, String] |
| 1190 |
Reverse Substrings Between Each Pair of Parentheses |
Code |
 |
[Stack] |
| 1191 |
K-Concatenation Maximum Sum |
Code |
 |
[Dynamic Programming] |
| 1192 |
Critical Connections in a Network |
Code |
 |
[Depth-first Search] |
| 1193 |
Monthly Transactions I |
Code |
 |
|
| 1194 |
Tournament Winners |
Code |
 |
|
| 1195 |
Fizz Buzz Multithreaded |
Code |
 |
|
| 1196 |
How Many Apples Can You Put into the Basket |
Code |
 |
[Greedy] |
| 1197 |
Minimum Knight Moves |
Code |
 |
[Breadth-first Search] |
| 1198 |
Find Smallest Common Element in All Rows |
Code |
 |
[Hash Table, Binary Search] |
| 1199 |
Minimum Time to Build Blocks |
Code |
 |
[Math, Dynamic Programming] |
| 1200 |
Minimum Absolute Difference |
Code |
 |
[Array] |
| 1201 |
Ugly Number III |
Code |
 |
[Math, Binary Search] |
| 1202 |
Smallest String With Swaps |
Code |
 |
[Array, Union Find] |
| 1203 |
Sort Items by Groups Respecting Dependencies |
Code |
 |
[Depth-first Search, Graph, Topological Sort] |
| 1204 |
Last Person to Fit in the Elevator |
Code |
 |
|
| 1205 |
Monthly Transactions II |
Code |
 |
|
| 1206 |
Design Skiplist |
Code |
 |
[Design] |
| 1207 |
Unique Number of Occurrences |
Code |
 |
[Hash Table] |
| 1208 |
Get Equal Substrings Within Budget |
Code |
 |
[Array, Sliding Window] |
| 1209 |
Remove All Adjacent Duplicates in String II |
Code |
 |
[Stack] |
| 1210 |
Minimum Moves to Reach Target with Rotations |
Code |
 |
[Breadth-first Search] |
| 1211 |
Queries Quality and Percentage |
Code |
 |
|
| 1212 |
Team Scores in Football Tournament |
Code |
 |
|
| 1213 |
Intersection of Three Sorted Arrays |
Code |
 |
[Hash Table, Two Pointers] |
| 1214 |
Two Sum BSTs |
Code |
 |
[Binary Search Tree] |
| 1215 |
Stepping Numbers |
Code |
 |
[Backtracking] |
| 1216 |
Valid Palindrome III |
Code |
 |
[String, Dynamic Programming] |
| 1217 |
Minimum Cost to Move Chips to The Same Position |
Code |
 |
[Array, Math, Greedy] |
| 1218 |
Longest Arithmetic Subsequence of Given Difference |
Code |
 |
[Math, Dynamic Programming] |
| 1219 |
Path with Maximum Gold |
Code |
 |
[Backtracking] |
| 1220 |
Count Vowels Permutation |
Code |
 |
[Dynamic Programming] |
| 1221 |
Split a String in Balanced Strings |
Code |
 |
[String, Greedy] |
| 1222 |
Queens That Can Attack the King |
Code |
 |
[Array] |
| 1223 |
Dice Roll Simulation |
Code |
 |
[Dynamic Programming] |
| 1224 |
Maximum Equal Frequency |
Code |
 |
[Hash Table] |
| 1225 |
Report Contiguous Dates |
Code |
 |
|
| 1226 |
The Dining Philosophers |
Code |
 |
|
| 1227 |
Airplane Seat Assignment Probability |
Code |
 |
[Math, Dynamic Programming, Brainteaser] |
| 1228 |
Missing Number In Arithmetic Progression |
Code |
 |
[Math] |
| 1229 |
Meeting Scheduler |
Code |
 |
[Line Sweep] |
| 1230 |
Toss Strange Coins |
Code |
 |
[Math, Dynamic Programming] |
| 1231 |
Divide Chocolate |
Code |
 |
[Binary Search, Greedy] |
| 1232 |
Check If It Is a Straight Line |
Code |
 |
[Array, Math, Geometry] |
| 1233 |
Remove Sub-Folders from the Filesystem |
Code |
 |
[Array, String] |
| 1234 |
Replace the Substring for Balanced String |
Code |
 |
[Two Pointers, String] |
| 1235 |
Maximum Profit in Job Scheduling |
Code |
 |
[Binary Search, Dynamic Programming, Sort] |
| 1236 |
Web Crawler |
Code |
 |
[Depth-first Search, Breadth-first Search] |
| 1237 |
Find Positive Integer Solution for a Given Equation |
Code |
 |
[Math, Binary Search] |
| 1238 |
Circular Permutation in Binary Representation |
Code |
 |
[Math] |
| 1239 |
Maximum Length of a Concatenated String with Unique Characters |
Code |
 |
[Backtracking, Bit Manipulation] |
| 1240 |
Tiling a Rectangle with the Fewest Squares |
Code |
 |
[Dynamic Programming, Backtracking] |
| 1241 |
Number of Comments per Post |
Code |
 |
|
| 1242 |
Web Crawler Multithreaded |
Code |
 |
[Depth-first Search, Breadth-first Search] |
| 1243 |
Array Transformation |
Code |
 |
[Array] |
| 1244 |
Design A Leaderboard |
Code |
 |
[Hash Table, Sort, Design] |
| 1245 |
Tree Diameter |
Code |
 |
[Tree, Depth-first Search, Breadth-first Search] |
| 1246 |
Palindrome Removal |
Code |
 |
[Dynamic Programming] |
| 1247 |
Minimum Swaps to Make Strings Equal |
Code |
 |
[String, Greedy] |
| 1248 |
Count Number of Nice Subarrays |
Code |
 |
[Two Pointers] |
| 1249 |
Minimum Remove to Make Valid Parentheses |
Code |
 |
[String, Stack] |
| 1250 |
Check If It Is a Good Array |
Code |
 |
[Math] |
| 1251 |
Average Selling Price |
Code |
 |
|
| 1252 |
Cells with Odd Values in a Matrix |
Code |
 |
[Array] |
| 1253 |
Reconstruct a 2-Row Binary Matrix |
Code |
 |
[Math, Greedy] |
| 1254 |
Number of Closed Islands |
Code |
 |
[Depth-first Search] |
| 1255 |
Maximum Score Words Formed by Letters |
Code |
 |
[Bit Manipulation] |
| 1256 |
Encode Number |
Code |
 |
[Math, Bit Manipulation] |
| 1257 |
Smallest Common Region |
Code |
 |
[Tree] |
| 1258 |
Synonymous Sentences |
Code |
 |
[Backtracking] |
| 1259 |
Handshakes That Don’t Cross |
Code |
 |
[Math, Dynamic Programming] |
| 1260 |
Shift 2D Grid |
Code |
 |
[Array] |
| 1261 |
Find Elements in a Contaminated Binary Tree |
Code |
 |
[Hash Table, Tree] |
| 1262 |
Greatest Sum Divisible by Three |
Code |
 |
[Dynamic Programming] |
| 1263 |
Minimum Moves to Move a Box to Their Target Location |
Code |
 |
[Breadth-first Search] |
| 1264 |
Page Recommendations |
Code |
 |
|
| 1265 |
Print Immutable Linked List in Reverse |
Code |
 |
|
| 1266 |
Minimum Time Visiting All Points |
Code |
 |
[Array, Geometry] |
| 1267 |
Count Servers that Communicate |
Code |
 |
[Array, Graph] |
| 1268 |
Search Suggestions System |
Code |
 |
[String] |
| 1269 |
Number of Ways to Stay in the Same Place After Some Steps |
Code |
 |
[Dynamic Programming] |
| 1270 |
All People Report to the Given Manager |
Code |
 |
|
| 1271 |
Hexspeak |
Code |
 |
[Math, String] |
| 1272 |
Remove Interval |
Code |
 |
[Math, Line Sweep] |
| 1273 |
Delete Tree Nodes |
Code |
 |
[Dynamic Programming, Depth-first Search] |
| 1274 |
Number of Ships in a Rectangle |
Code |
 |
[Divide and Conquer] |
| 1275 |
Find Winner on a Tic Tac Toe Game |
Code |
 |
[Array] |
| 1276 |
Number of Burgers with No Waste of Ingredients |
Code |
 |
[Math, Greedy] |
| 1277 |
Count Square Submatrices with All Ones |
Code |
 |
[Array, Dynamic Programming] |
| 1278 |
Palindrome Partitioning III |
Code |
 |
[Dynamic Programming] |
| 1279 |
Traffic Light Controlled Intersection |
Code |
 |
|
| 1280 |
Students and Examinations |
Code |
 |
|
| 1281 |
Subtract the Product and Sum of Digits of an Integer |
Code |
 |
[Math] |
| 1282 |
Group the People Given the Group Size They Belong To |
Code |
 |
[Greedy] |
| 1283 |
Find the Smallest Divisor Given a Threshold |
Code |
 |
[Binary Search] |
| 1284 |
Minimum Number of Flips to Convert Binary Matrix to Zero Matrix |
Code |
 |
[Breadth-first Search] |
| 1285 |
Find the Start and End Number of Continuous Ranges |
Code |
 |
|
| 1286 |
Iterator for Combination |
Code |
 |
[Backtracking, Design] |
| 1287 |
Element Appearing More Than 25% In Sorted Array |
Code |
 |
[Array] |
| 1288 |
Remove Covered Intervals |
Code |
 |
[Greedy, Sort, Line Sweep] |
| 1289 |
Minimum Falling Path Sum II |
Code |
 |
[Dynamic Programming] |
| 1290 |
Convert Binary Number in a Linked List to Integer |
Code |
 |
[Linked List, Bit Manipulation] |
| 1291 |
Sequential Digits |
Code |
 |
[Backtracking] |
| 1292 |
Maximum Side Length of a Square with Sum Less than or Equal to Threshold |
Code |
 |
[Array, Binary Search] |
| 1293 |
Shortest Path in a Grid with Obstacles Elimination |
Code |
 |
[Breadth-first Search] |
| 1294 |
Weather Type in Each Country |
Code |
 |
|
| 1295 |
Find Numbers with Even Number of Digits |
Code |
 |
[Array] |
| 1296 |
Divide Array in Sets of K Consecutive Numbers |
Code |
 |
[Array, Greedy] |
| 1297 |
Maximum Number of Occurrences of a Substring |
Code |
 |
[String, Bit Manipulation] |
| 1298 |
Maximum Candies You Can Get from Boxes |
Code |
 |
[Breadth-first Search] |
| 1299 |
Replace Elements with Greatest Element on Right Side |
Code |
 |
[Array] |
| 1300 |
Sum of Mutated Array Closest to Target |
Code |
 |
[Array, Binary Search] |
| 1301 |
Number of Paths with Max Score |
Code |
 |
[Dynamic Programming] |
| 1302 |
Deepest Leaves Sum |
Code |
 |
[Tree, Depth-first Search] |
| 1303 |
Find the Team Size |
Code |
 |
|
| 1304 |
Find N Unique Integers Sum up to Zero |
Code |
 |
[Array] |
| 1305 |
All Elements in Two Binary Search Trees |
Code |
 |
[Sort, Tree] |
| 1306 |
Jump Game III |
Code |
 |
[Depth-first Search, Breadth-first Search, Recursion] |
| 1307 |
Verbal Arithmetic Puzzle |
Code |
 |
[Math, Backtracking] |
| 1308 |
Running Total for Different Genders |
Code |
 |
|
| 1309 |
Decrypt String from Alphabet to Integer Mapping |
Code |
 |
[String] |
| 1310 |
XOR Queries of a Subarray |
Code |
 |
[Bit Manipulation] |
| 1311 |
Get Watched Videos by Your Friends |
Code |
 |
[Hash Table, String, Breadth-first Search] |
| 1312 |
Minimum Insertion Steps to Make a String Palindrome |
Code |
 |
[Dynamic Programming] |
| 1313 |
Decompress Run-Length Encoded List |
Code |
 |
[Array] |
| 1314 |
Matrix Block Sum |
Code |
 |
[Dynamic Programming] |
| 1315 |
Sum of Nodes with Even-Valued Grandparent |
Code |
 |
[Tree, Depth-first Search] |
| 1316 |
Distinct Echo Substrings |
Code |
 |
[String, Rolling Hash] |
| 1317 |
Convert Integer to the Sum of Two No-Zero Integers |
Code |
 |
[Math] |
| 1318 |
Minimum Flips to Make a OR b Equal to c |
Code |
 |
[Bit Manipulation] |
| 1319 |
Number of Operations to Make Network Connected |
Code |
 |
[Depth-first Search, Breadth-first Search, Union Find] |
| 1320 |
Minimum Distance to Type a Word Using Two Fingers |
Code |
 |
[Dynamic Programming] |
| 1321 |
Restaurant Growth |
Code |
 |
|
| 1322 |
Ads Performance |
Code |
 |
|
| 1323 |
Maximum 69 Number |
Code |
 |
[Math] |
| 1324 |
Print Words Vertically |
Code |
 |
[String] |
| 1325 |
Delete Leaves With a Given Value |
Code |
 |
[Tree] |
| 1326 |
Minimum Number of Taps to Open to Water a Garden |
Code |
 |
[Dynamic Programming, Greedy] |
| 1327 |
List the Products Ordered in a Period |
Code |
 |
|
| 1328 |
Break a Palindrome |
Code |
 |
[String] |
| 1329 |
Sort the Matrix Diagonally |
Code |
 |
[Array, Sort] |
| 1330 |
Reverse Subarray To Maximize Array Value |
Code |
 |
[Array, Math] |
| 1331 |
Rank Transform of an Array |
Code |
 |
[Array] |
| 1332 |
Remove Palindromic Subsequences |
Code |
 |
[String] |
| 1333 |
Filter Restaurants by Vegan-Friendly, Price and Distance |
Code |
 |
[Array, Sort] |
| 1334 |
Find the City With the Smallest Number of Neighbors at a Threshold Distance |
Code |
 |
[Graph] |
| 1335 |
Minimum Difficulty of a Job Schedule |
Code |
 |
[Dynamic Programming] |
| 1336 |
Number of Transactions per Visit |
Code |
 |
|
| 1337 |
The K Weakest Rows in a Matrix |
Code |
 |
[Array, Binary Search] |
| 1338 |
Reduce Array Size to The Half |
Code |
 |
[Array, Greedy] |
| 1339 |
Maximum Product of Splitted Binary Tree |
Code |
 |
[Dynamic Programming, Tree, Depth-first Search] |
| 1340 |
Jump Game V |
Code |
 |
[Dynamic Programming] |
| 1341 |
Movie Rating |
Code |
 |
|
| 1342 |
Number of Steps to Reduce a Number to Zero |
Code |
 |
[Bit Manipulation] |
| 1343 |
Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold |
Code |
 |
[Array] |
| 1344 |
Angle Between Hands of a Clock |
Code |
 |
[Math] |
| 1345 |
Jump Game IV |
Code |
 |
[Breadth-first Search] |
| 1346 |
Check If N and Its Double Exist |
Code |
 |
[Array] |
| 1347 |
Minimum Number of Steps to Make Two Strings Anagram |
Code |
 |
[String] |
| 1348 |
Tweet Counts Per Frequency |
Code |
 |
[Design] |
| 1349 |
Maximum Students Taking Exam |
Code |
 |
[Dynamic Programming] |
| 1350 |
Students With Invalid Departments |
Code |
 |
|
| 1351 |
Count Negative Numbers in a Sorted Matrix |
Code |
 |
[Array, Binary Search] |
| 1352 |
Product of the Last K Numbers |
Code |
 |
[Array, Design] |
| 1353 |
Maximum Number of Events That Can Be Attended |
Code |
 |
[Greedy, Sort, Segment Tree] |
| 1354 |
Construct Target Array With Multiple Sums |
Code |
 |
[Greedy] |
| 1355 |
Activity Participants |
Code |
 |
|
| 1356 |
Sort Integers by The Number of 1 Bits |
Code |
 |
[Sort, Bit Manipulation] |
| 1357 |
Apply Discount Every n Orders |
Code |
 |
[Design] |
| 1358 |
Number of Substrings Containing All Three Characters |
Code |
 |
[String] |
| 1359 |
Count All Valid Pickup and Delivery Options |
Code |
 |
[Math, Dynamic Programming] |
| 1360 |
Number of Days Between Two Dates |
Code |
 |
|
| 1361 |
Validate Binary Tree Nodes |
Code |
 |
[Graph] |
| 1362 |
Closest Divisors |
Code |
 |
[Math] |
| 1363 |
Largest Multiple of Three |
Code |
 |
[Math, Dynamic Programming] |
| 1364 |
Number of Trusted Contacts of a Customer |
Code |
 |
|
| 1365 |
How Many Numbers Are Smaller Than the Current Number |
Code |
 |
[Array, Hash Table] |
| 1366 |
Rank Teams by Votes |
Code |
 |
[Array, Sort] |
| 1367 |
Linked List in Binary Tree |
Code |
 |
[Linked List, Dynamic Programming, Tree] |
| 1368 |
Minimum Cost to Make at Least One Valid Path in a Grid |
Code |
 |
[Breadth-first Search] |
| 1369 |
Get the Second Most Recent Activity |
Code |
 |
|
| 1370 |
Increasing Decreasing String |
Code |
 |
[String, Sort] |
| 1371 |
Find the Longest Substring Containing Vowels in Even Counts |
Code |
 |
[String] |
| 1372 |
Longest ZigZag Path in a Binary Tree |
Code |
 |
[Dynamic Programming, Tree] |
| 1373 |
Maximum Sum BST in Binary Tree |
Code |
 |
[Dynamic Programming, Binary Search Tree] |
| 1374 |
Generate a String With Characters That Have Odd Counts |
Code |
 |
[String] |
| 1375 |
Bulb Switcher III |
Code |
 |
[Array] |
| 1376 |
Time Needed to Inform All Employees |
Code |
 |
[Depth-first Search] |
| 1377 |
Frog Position After T Seconds |
Code |
 |
[Depth-first Search] |
| 1378 |
Replace Employee ID With The Unique Identifier |
Code |
 |
|
| 1379 |
Find a Corresponding Node of a Binary Tree in a Clone of That Tree |
Code |
 |
[Tree] |
| 1380 |
Lucky Numbers in a Matrix |
Code |
 |
[Array] |
| 1381 |
Design a Stack With Increment Operation |
Code |
 |
[Stack, Design] |
| 1382 |
Balance a Binary Search Tree |
Code |
 |
[Binary Search Tree] |
| 1383 |
Maximum Performance of a Team |
Code |
 |
[Greedy, Sort] |
| 1384 |
Total Sales Amount by Year |
Code |
 |
|
| 1385 |
Find the Distance Value Between Two Arrays |
Code |
 |
[Array] |
| 1386 |
Cinema Seat Allocation |
Code |
 |
[Array, Greedy] |
| 1387 |
Sort Integers by The Power Value |
Code |
 |
[Sort, Graph] |
| 1388 |
Pizza With 3n Slices |
Code |
 |
[Dynamic Programming] |
| 1389 |
Create Target Array in the Given Order |
Code |
 |
[Array] |
| 1390 |
Four Divisors |
Code |
 |
[Math] |
| 1391 |
Check if There is a Valid Path in a Grid |
Code |
 |
[Depth-first Search, Breadth-first Search] |
| 1392 |
Longest Happy Prefix |
Code |
 |
[String] |
| 1393 |
Capital Gain/Loss |
Code |
 |
|
| 1394 |
Find Lucky Integer in an Array |
Code |
 |
[Array] |
| 1395 |
Count Number of Teams |
Code |
 |
[Array] |
| 1396 |
Design Underground System |
Code |
 |
[Design] |
| 1397 |
Find All Good Strings |
Code |
 |
[Dynamic Programming] |
| 1398 |
Customers Who Bought Products A and B but Not C |
Code |
 |
|
| 1399 |
Count Largest Group |
Code |
 |
[Array] |
| 1400 |
Construct K Palindrome Strings |
Code |
 |
[Greedy] |
| 1401 |
Circle and Rectangle Overlapping |
Code |
 |
[Geometry] |
| 1402 |
Reducing Dishes |
Code |
 |
[Dynamic Programming] |
| 1403 |
Minimum Subsequence in Non-Increasing Order |
Code |
 |
[Greedy, Sort] |
| 1404 |
Number of Steps to Reduce a Number in Binary Representation to One |
Code |
 |
[String, Bit Manipulation] |
| 1405 |
Longest Happy String |
Code |
 |
[Dynamic Programming, Greedy] |
| 1406 |
Stone Game III |
Code |
 |
[Dynamic Programming] |
| 1407 |
Top Travellers |
Code |
 |
|
| 1408 |
String Matching in an Array |
Code |
 |
[String] |
| 1409 |
Queries on a Permutation With Key |
Code |
 |
[Array] |
| 1410 |
HTML Entity Parser |
Code |
 |
[String, Stack] |
| 1411 |
Number of Ways to Paint N × 3 Grid |
Code |
 |
[Dynamic Programming] |
| 1412 |
Find the Quiet Students in All Exams |
Code |
 |
|
| 1413 |
Minimum Value to Get Positive Step by Step Sum |
Code |
 |
[Array] |
| 1414 |
Find the Minimum Number of Fibonacci Numbers Whose Sum Is K |
Code |
 |
[Array, Greedy] |
| 1415 |
The k-th Lexicographical String of All Happy Strings of Length n |
Code |
 |
[Backtracking] |
| 1416 |
Restore The Array |
Code |
 |
[Dynamic Programming] |
| 1417 |
Reformat The String |
Code |
 |
[String] |
| 1418 |
Display Table of Food Orders in a Restaurant |
Code |
 |
[Hash Table] |
| 1419 |
Minimum Number of Frogs Croaking |
Code |
 |
[String] |
| 1420 |
Build Array Where You Can Find The Maximum Exactly K Comparisons |
Code |
 |
[Dynamic Programming] |
| 1421 |
NPV Queries |
Code |
 |
|
| 1422 |
Maximum Score After Splitting a String |
Code |
 |
[String] |
| 1423 |
Maximum Points You Can Obtain from Cards |
Code |
 |
[Array, Dynamic Programming, Sliding Window] |
| 1424 |
Diagonal Traverse II |
Code |
 |
[Array, Sort] |
| 1425 |
Constrained Subsequence Sum |
Code |
 |
[Dynamic Programming] |
| 1426 |
Counting Elements |
Code |
 |
[Array] |
| 1427 |
Perform String Shifts |
Code |
 |
[Array, Math] |
| 1428 |
Leftmost Column with at Least a One |
Code |
 |
[Array] |
| 1429 |
First Unique Number |
Code |
 |
[Hash Table, Design] |
| 1430 |
Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree |
Code |
 |
[Tree] |
| 1431 |
Kids With the Greatest Number of Candies |
Code |
 |
[Array] |
| 1432 |
Max Difference You Can Get From Changing an Integer |
Code |
 |
[String] |
| 1433 |
Check If a String Can Break Another String |
Code |
 |
[String, Greedy] |
| 1434 |
Number of Ways to Wear Different Hats to Each Other |
Code |
 |
[Dynamic Programming, Bit Manipulation] |
| 1435 |
Create a Session Bar Chart |
Code |
 |
|
| 1436 |
Destination City |
Code |
 |
[String] |
| 1437 |
Check If All 1’s Are at Least Length K Places Away |
Code |
 |
[Array] |
| 1438 |
Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit |
Code |
 |
[Array, Sliding Window] |
| 1439 |
Find the Kth Smallest Sum of a Matrix With Sorted Rows |
Code |
 |
[Heap] |
| 1440 |
Evaluate Boolean Expression |
Code |
 |
|
| 1441 |
Build an Array With Stack Operations |
Code |
 |
[Stack] |
| 1442 |
Count Triplets That Can Form Two Arrays of Equal XOR |
Code |
 |
[Array, Math, Bit Manipulation] |
| 1443 |
Minimum Time to Collect All Apples in a Tree |
Code |
 |
[Tree, Depth-first Search] |
| 1444 |
Number of Ways of Cutting a Pizza |
Code |
 |
[Dynamic Programming] |
| 1445 |
Apples & Oranges |
Code |
 |
|
| 1446 |
Consecutive Characters |
Code |
 |
[String] |
| 1447 |
Simplified Fractions |
Code |
 |
[Math] |
| 1448 |
Count Good Nodes in Binary Tree |
Code |
 |
[Tree, Depth-first Search] |
| 1449 |
Form Largest Integer With Digits That Add up to Target |
Code |
 |
[String, Dynamic Programming] |
| 1450 |
Number of Students Doing Homework at a Given Time |
Code |
 |
[Array] |
| 1451 |
Rearrange Words in a Sentence |
Code |
 |
[String, Sort] |
| 1452 |
People Whose List of Favorite Companies Is Not a Subset of Another List |
Code |
 |
[String, Sort] |
| 1453 |
Maximum Number of Darts Inside of a Circular Dartboard |
Code |
 |
[Geometry] |
| 1454 |
Active Users |
Code |
 |
|
| 1455 |
Check If a Word Occurs As a Prefix of Any Word in a Sentence |
Code |
 |
[String] |
| 1456 |
Maximum Number of Vowels in a Substring of Given Length |
Code |
 |
[String, Sliding Window] |
| 1457 |
Pseudo-Palindromic Paths in a Binary Tree |
Code |
 |
[Bit Manipulation, Tree, Depth-first Search] |
| 1458 |
Max Dot Product of Two Subsequences |
Code |
 |
[Dynamic Programming] |
| 1459 |
Rectangles Area |
Code |
 |
|
| 1460 |
Make Two Arrays Equal by Reversing Sub-arrays |
Code |
 |
[Array] |
| 1461 |
Check If a String Contains All Binary Codes of Size K |
Code |
 |
[String, Bit Manipulation] |
| 1462 |
Course Schedule IV |
Code |
 |
[Graph] |
| 1463 |
Cherry Pickup II |
Code |
 |
[Dynamic Programming] |
| 1464 |
Maximum Product of Two Elements in an Array |
Code |
 |
[Array] |
| 1465 |
Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts |
Code |
 |
[Array] |
| 1466 |
Reorder Routes to Make All Paths Lead to the City Zero |
Code |
 |
[Tree, Depth-first Search] |
| 1467 |
Probability of a Two Boxes Having The Same Number of Distinct Balls |
Code |
 |
[Math, Backtracking] |
| 1468 |
Calculate Salaries |
Code |
 |
|
| 1469 |
Find All The Lonely Nodes |
Code |
 |
[Tree, Depth-first Search] |
| 1470 |
Shuffle the Array |
Code |
 |
[Array] |
| 1471 |
The k Strongest Values in an Array |
Code |
 |
[Array, Sort] |
| 1472 |
Design Browser History |
Code |
 |
[Design] |
| 1473 |
Paint House III |
Code |
 |
[Dynamic Programming] |
| 1474 |
Delete N Nodes After M Nodes of a Linked List |
Code |
 |
[Linked List] |
| 1475 |
Final Prices With a Special Discount in a Shop |
Code |
 |
[Array] |
| 1476 |
Subrectangle Queries |
Code |
 |
[Array] |
| 1477 |
Find Two Non-overlapping Sub-arrays Each With Target Sum |
Code |
 |
[Dynamic Programming] |
| 1478 |
Allocate Mailboxes |
Code |
 |
[Math, Dynamic Programming] |
| 1479 |
Sales by Day of the Week |
Code |
 |
|
| 1480 |
Running Sum of 1d Array |
Code |
 |
[Array] |
| 1481 |
Least Number of Unique Integers after K Removals |
Code |
 |
[Array, Sort] |
| 1482 |
Minimum Number of Days to Make m Bouquets |
Code |
 |
[Array, Binary Search] |
| 1483 |
Kth Ancestor of a Tree Node |
Code |
 |
[Dynamic Programming] |
| 1484 |
Group Sold Products By The Date |
Code |
 |
|
| 1485 |
Clone Binary Tree With Random Pointer |
Code |
 |
[Hash Table, Tree, Depth-first Search, Breadth-first Search] |
| 1486 |
XOR Operation in an Array |
Code |
 |
[Array, Bit Manipulation] |
| 1487 |
Making File Names Unique |
Code |
 |
[Hash Table, String] |
| 1488 |
Avoid Flood in The City |
Code |
 |
[Array, Hash Table] |
| 1489 |
Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree |
Code |
 |
[Depth-first Search, Union Find] |
| 1490 |
Clone N-ary Tree |
Code |
 |
[Hash Table, Tree, Depth-first Search, Breadth-first Search] |
| 1491 |
Average Salary Excluding the Minimum and Maximum Salary |
Code |
 |
[Array, Sort] |
| 1492 |
The kth Factor of n |
Code |
 |
[Math] |
| 1493 |
Longest Subarray of 1’s After Deleting One Element |
Code |
 |
[Array] |
| 1494 |
Parallel Courses II |
Code |
 |
[Graph] |
| 1495 |
Friendly Movies Streamed Last Month |
Code |
 |
|
| 1496 |
Path Crossing |
Code |
 |
[String] |
| 1497 |
Check If Array Pairs Are Divisible by k |
Code |
 |
[Array, Math, Greedy] |
| 1498 |
Number of Subsequences That Satisfy the Given Sum Condition |
Code |
 |
[Sort, Sliding Window] |
| 1499 |
Max Value of Equation |
Code |
 |
[Array, Sliding Window] |
| 1500 |
Design a File Sharing System |
Code |
 |
[Array, Design] |
| 1501 |
Countries You Can Safely Invest In |
Code |
 |
|
| 1502 |
Can Make Arithmetic Progression From Sequence |
Code |
 |
[Array, Sort] |
| 1503 |
Last Moment Before All Ants Fall Out of a Plank |
Code |
 |
[Array, Brainteaser] |
| 1504 |
Count Submatrices With All Ones |
Code |
 |
[Dynamic Programming] |
| 1505 |
Minimum Possible Integer After at Most K Adjacent Swaps On Digits |
Code |
 |
[Greedy] |
| 1506 |
Find Root of N-Ary Tree |
Code |
 |
|
| 1507 |
Reformat Date |
Code |
 |
[String] |
| 1508 |
Range Sum of Sorted Subarray Sums |
Code |
 |
[Array, Sort] |
| 1509 |
Minimum Difference Between Largest and Smallest Value in Three Moves |
Code |
 |
[Array, Sort] |
| 1510 |
Stone Game IV |
Code |
 |
[Dynamic Programming] |
| 1511 |
Customer Order Frequency |
Code |
 |
|
| 1512 |
Number of Good Pairs |
Code |
 |
[Array, Hash Table, Math] |
| 1513 |
Number of Substrings With Only 1s |
Code |
 |
[Math, String] |
| 1514 |
Path with Maximum Probability |
Code |
 |
[Graph] |
| 1515 |
Best Position for a Service Centre |
Code |
 |
[Geometry] |
| 1516 |
Move Sub-Tree of N-Ary Tree |
Code |
 |
[Tree] |
| 1517 |
Find Users With Valid E-Mails |
Code |
 |
|
| 1518 |
Water Bottles |
Code |
 |
[Greedy] |
| 1519 |
Number of Nodes in the Sub-Tree With the Same Label |
Code |
 |
[Depth-first Search, Breadth-first Search] |
| 1520 |
Maximum Number of Non-Overlapping Substrings |
Code |
 |
[Greedy] |
| 1521 |
Find a Value of a Mysterious Function Closest to Target |
Code |
 |
[Binary Search, Bit Manipulation, Segment Tree] |
| 1522 |
Diameter of N-Ary Tree |
Code |
 |
|
| 1523 |
Count Odd Numbers in an Interval Range |
Code |
 |
[Math] |
| 1524 |
Number of Sub-arrays With Odd Sum |
Code |
 |
[Array, Math] |
| 1525 |
Number of Good Ways to Split a String |
Code |
 |
[String, Bit Manipulation] |
| 1526 |
Minimum Number of Increments on Subarrays to Form a Target Array |
Code |
 |
[Segment Tree] |
| 1527 |
Patients With a Condition |
Code |
 |
|
| 1528 |
Shuffle String |
Code |
 |
[Sort] |
| 1529 |
Bulb Switcher IV |
Code |
 |
[String] |
| 1530 |
Number of Good Leaf Nodes Pairs |
Code |
 |
[Tree, Depth-first Search] |
| 1531 |
String Compression II |
Code |
 |
[String, Dynamic Programming] |
| 1532 |
The Most Recent Three Orders |
Code |
 |
|
| 1533 |
Find the Index of the Large Integer |
Code |
 |
[Binary Search] |
| 1534 |
Count Good Triplets |
Code |
 |
[Array] |
| 1535 |
Find the Winner of an Array Game |
Code |
 |
[Array] |
| 1536 |
Minimum Swaps to Arrange a Binary Grid |
Code |
 |
[Greedy] |
| 1537 |
Get the Maximum Score |
Code |
 |
[Dynamic Programming] |
| 1538 |
Guess the Majority in a Hidden Array |
Code |
 |
|
| 1539 |
Kth Missing Positive Number |
Code |
 |
[Array, Hash Table] |
| 1540 |
Can Convert String in K Moves |
Code |
 |
[String, Greedy] |
| 1541 |
Minimum Insertions to Balance a Parentheses String |
Code |
 |
[String, Stack] |
| 1542 |
Find Longest Awesome Substring |
Code |
 |
[String, Bit Manipulation] |
| 1543 |
Fix Product Name Format |
Code |
 |
|
| 1544 |
Make The String Great |
Code |
 |
[String, Stack] |
| 1545 |
Find Kth Bit in Nth Binary String |
Code |
 |
[String] |
| 1546 |
Maximum Number of Non-Overlapping Subarrays With Sum Equals Target |
Code |
 |
[Dynamic Programming] |
| 1547 |
Minimum Cost to Cut a Stick |
Code |
 |
[Dynamic Programming] |
| 1548 |
The Most Similar Path in a Graph |
Code |
 |
[Dynamic Programming, Graph] |
| 1549 |
The Most Recent Orders for Each Product |
Code |
 |
|
| 1550 |
Three Consecutive Odds |
Code |
 |
[Array] |
| 1551 |
Minimum Operations to Make Array Equal |
Code |
 |
[Math] |
| 1552 |
Magnetic Force Between Two Balls |
Code |
 |
[Array, Binary Search] |
| 1553 |
Minimum Number of Days to Eat N Oranges |
Code |
 |
[Dynamic Programming] |
| 1554 |
Strings Differ by One Character |
Code |
 |
|
| 1555 |
Bank Account Summary |
Code |
 |
|
| 1556 |
Thousand Separator |
Code |
 |
[String] |
| 1557 |
Minimum Number of Vertices to Reach All Nodes |
Code |
 |
[Graph] |
| 1558 |
Minimum Numbers of Function Calls to Make Target Array |
Code |
 |
[Greedy] |
| 1559 |
Detect Cycles in 2D Grid |
Code |
 |
[Depth-first Search] |
| 1560 |
Most Visited Sector in a Circular Track |
Code |
 |
[Array] |
| 1561 |
Maximum Number of Coins You Can Get |
Code |
 |
[Sort] |
| 1562 |
Find Latest Group of Size M |
Code |
 |
[Binary Search] |
| 1563 |
Stone Game V |
Code |
 |
[Dynamic Programming] |
| 1564 |
Put Boxes Into the Warehouse I |
Code |
 |
[Greedy] |
| 1565 |
Unique Orders and Customers Per Month |
Code |
 |
|
| 1566 |
Detect Pattern of Length M Repeated K or More Times |
Code |
 |
[Array] |
| 1567 |
Maximum Length of Subarray With Positive Product |
Code |
 |
[Greedy] |
| 1568 |
Minimum Number of Days to Disconnect Island |
Code |
 |
[Greedy] |
| 1569 |
Number of Ways to Reorder Array to Get Same BST |
Code |
 |
[Dynamic Programming] |
| 1570 |
Dot Product of Two Sparse Vectors |
Code |
 |
[Array, Hash Table, Two Pointers] |
| 1571 |
Warehouse Manager |
Code |
 |
|
| 1572 |
Matrix Diagonal Sum |
Code |
 |
[Array] |
| 1573 |
Number of Ways to Split a String |
Code |
 |
[String] |
| 1574 |
Shortest Subarray to be Removed to Make Array Sorted |
Code |
 |
[Array, Binary Search] |
| 1575 |
Count All Possible Routes |
Code |
 |
[Dynamic Programming] |
| 1576 |
Replace All ?’s to Avoid Consecutive Repeating Characters |
Code |
 |
[String] |
| 1577 |
Number of Ways Where Square of Number Is Equal to Product of Two Numbers |
Code |
 |
[Hash Table, Math] |
| 1578 |
Minimum Deletion Cost to Avoid Repeating Letters |
Code |
 |
[Greedy] |
| 1579 |
Remove Max Number of Edges to Keep Graph Fully Traversable |
Code |
 |
[Union Find] |
| 1580 |
Put Boxes Into the Warehouse II |
Code |
 |
[Greedy] |
| 1581 |
Customer Who Visited but Did Not Make Any Transactions |
Code |
 |
|
| 1582 |
Special Positions in a Binary Matrix |
Code |
 |
[Array] |
| 1583 |
Count Unhappy Friends |
Code |
 |
[Array] |
| 1584 |
Min Cost to Connect All Points |
Code |
 |
[Union Find] |
| 1585 |
Check If String Is Transformable With Substring Sort Operations |
Code |
 |
[String, Greedy] |
| 1586 |
Binary Search Tree Iterator II |
Code |
 |
[Tree, Design] |
| 1587 |
Bank Account Summary II |
Code |
 |
|
| 1588 |
Sum of All Odd Length Subarrays |
Code |
 |
[Array] |
| 1589 |
Maximum Sum Obtained of Any Permutation |
Code |
 |
[Greedy] |
| 1590 |
Make Sum Divisible by P |
Code |
 |
[Array, Hash Table, Math, Binary Search] |
| 1591 |
Strange Printer II |
Code |
 |
[Greedy] |
| 1592 |
Rearrange Spaces Between Words |
Code |
 |
[String] |
| 1593 |
Split a String Into the Max Number of Unique Substrings |
Code |
 |
[Backtracking] |
| 1594 |
Maximum Non Negative Product in a Matrix |
Code |
 |
[Dynamic Programming, Greedy] |
| 1595 |
Minimum Cost to Connect Two Groups of Points |
Code |
 |
[Dynamic Programming, Graph] |
| 1596 |
The Most Frequently Ordered Products for Each Customer |
Code |
 |
|
| 1597 |
Build Binary Expression Tree From Infix Expression |
Code |
 |
[String, Tree] |
| 1598 |
Crawler Log Folder |
Code |
 |
[Stack] |
| 1599 |
Maximum Profit of Operating a Centennial Wheel |
Code |
 |
[Greedy] |
| 1600 |
Throne Inheritance |
Code |
 |
[Tree, Design] |
| 1601 |
Maximum Number of Achievable Transfer Requests |
Code |
 |
[Dynamic Programming] |
| 1602 |
Find Nearest Right Node in Binary Tree |
Code |
 |
[Tree, Breadth-first Search] |
| 1603 |
Design Parking System |
Code |
 |
[Design] |
| 1604 |
Alert Using Same Key-Card Three or More Times in a One Hour Period |
Code |
 |
[String, Ordered Map] |
| 1605 |
Find Valid Matrix Given Row and Column Sums |
Code |
 |
[Greedy] |
| 1606 |
Find Servers That Handled Most Number of Requests |
Code |
 |
[Ordered Map] |
| 1607 |
Sellers With No Sales |
Code |
 |
|
| 1608 |
Special Array With X Elements Greater Than or Equal X |
Code |
 |
[Array] |
| 1609 |
Even Odd Tree |
Code |
 |
[Tree] |
| 1610 |
Maximum Number of Visible Points |
Code |
 |
[Two Pointers, Geometry] |
| 1611 |
Minimum One Bit Operations to Make Integers Zero |
Code |
 |
[Dynamic Programming, Bit Manipulation] |
| 1612 |
Check If Two Expression Trees are Equivalent |
Code |
 |
[Hash Table, Tree] |
| 1613 |
Find the Missing IDs |
Code |
 |
|
| 1614 |
Maximum Nesting Depth of the Parentheses |
Code |
 |
[String] |
| 1615 |
Maximal Network Rank |
Code |
 |
[Graph] |
| 1616 |
Split Two Strings to Make Palindrome |
Code |
 |
[Two Pointers, String, Greedy] |
| 1617 |
Count Subtrees With Max Distance Between Cities |
Code |
 |
[Backtracking] |
| 1618 |
Maximum Font to Fit a Sentence in a Screen |
Code |
 |
[String, Binary Search] |
| 1619 |
Mean of Array After Removing Some Elements |
Code |
 |
[Array] |
| 1620 |
Coordinate With Maximum Network Quality |
Code |
 |
[Greedy] |
| 1621 |
Number of Sets of K Non-Overlapping Line Segments |
Code |
 |
[Dynamic Programming] |
| 1622 |
Fancy Sequence |
Code |
 |
[Math, Design] |
| 1623 |
All Valid Triplets That Can Represent a Country |
Code |
 |
|
| 1624 |
Largest Substring Between Two Equal Characters |
Code |
 |
[String] |
| 1625 |
Lexicographically Smallest String After Applying Operations |
Code |
 |
[Depth-first Search, Breadth-first Search] |
| 1626 |
Best Team With No Conflicts |
Code |
 |
[Dynamic Programming] |
| 1627 |
Graph Connectivity With Threshold |
Code |
 |
[Math, Union Find] |
| 1628 |
Design an Expression Tree With Evaluate Function |
Code |
 |
[Tree, Design, OOP] |
| 1629 |
Slowest Key |
Code |
 |
[Array] |
| 1630 |
Arithmetic Subarrays |
Code |
 |
[Sort] |
| 1631 |
Path With Minimum Effort |
Code |
 |
[Binary Search, Depth-first Search, Union Find, Graph] |
| 1632 |
Rank Transform of a Matrix |
Code |
 |
[Greedy, Union Find] |
| 1633 |
Percentage of Users Attended a Contest |
Code |
 |
|
| 1634 |
Add Two Polynomials Represented as Linked Lists |
Code |
 |
[Linked List] |
| 1635 |
Hopper Company Queries I |
Code |
 |
|
| 1636 |
Sort Array by Increasing Frequency |
Code |
 |
[Array, Sort] |
| 1637 |
Widest Vertical Area Between Two Points Containing No Points |
Code |
 |
[Sort] |
| 1638 |
Count Substrings That Differ by One Character |
Code |
 |
[Hash Table, String, Trie, Rolling Hash] |
| 1639 |
Number of Ways to Form a Target String Given a Dictionary |
Code |
 |
[Dynamic Programming] |
| 1640 |
Check Array Formation Through Concatenation |
Code |
 |
[Array, Sort] |
| 1641 |
Count Sorted Vowel Strings |
Code |
 |
[Math, Dynamic Programming, Backtracking] |
| 1642 |
Furthest Building You Can Reach |
Code |
 |
[Binary Search, Heap] |
| 1643 |
Kth Smallest Instructions |
Code |
 |
[Dynamic Programming] |
| 1644 |
Lowest Common Ancestor of a Binary Tree II |
Code |
 |
[Tree] |
| 1645 |
Hopper Company Queries II |
Code |
 |
|
| 1646 |
Get Maximum in Generated Array |
Code |
 |
[Array] |
| 1647 |
Minimum Deletions to Make Character Frequencies Unique |
Code |
 |
[Greedy, Sort] |
| 1648 |
Sell Diminishing-Valued Colored Balls |
Code |
 |
[Math, Greedy, Sort] |
| 1649 |
Create Sorted Array through Instructions |
Code |
 |
[Binary Indexed Tree, Segment Tree, Ordered Map] |
| 1650 |
Lowest Common Ancestor of a Binary Tree III |
Code |
 |
[Tree] |
| 1651 |
Hopper Company Queries III |
Code |
 |
|
| 1652 |
Defuse the Bomb |
Code |
 |
[Array] |
| 1653 |
Minimum Deletions to Make String Balanced |
Code |
 |
[String, Greedy] |
| 1654 |
Minimum Jumps to Reach Home |
Code |
 |
[Dynamic Programming, Breadth-first Search] |
| 1655 |
Distribute Repeating Integers |
Code |
 |
[Dynamic Programming, Backtracking] |
| 1656 |
Design an Ordered Stream |
Code |
 |
[Array, Design] |
| 1657 |
Determine if Two Strings Are Close |
Code |
 |
[Greedy] |
| 1658 |
Minimum Operations to Reduce X to Zero |
Code |
 |
[Two Pointers, Binary Search, Greedy] |
| 1659 |
Maximize Grid Happiness |
Code |
 |
[Dynamic Programming, Backtracking] |
| 1660 |
Correct a Binary Tree |
Code |
 |
[Tree] |
| 1661 |
Average Time of Process per Machine |
Code |
 |
|
| 1662 |
Check If Two String Arrays are Equivalent |
Code |
 |
[String] |
| 1663 |
Smallest String With A Given Numeric Value |
Code |
 |
[Greedy] |
| 1664 |
Ways to Make a Fair Array |
Code |
 |
[Dynamic Programming, Greedy] |
| 1665 |
Minimum Initial Energy to Finish Tasks |
Code |
 |
[Greedy] |
| 1666 |
Change the Root of a Binary Tree |
Code |
 |
[Tree, Depth-first Search] |
| 1667 |
Fix Names in a Table |
Code |
 |
|
| 1668 |
Maximum Repeating Substring |
Code |
 |
[String] |
| 1669 |
Merge In Between Linked Lists |
Code |
 |
[Linked List] |
| 1670 |
Design Front Middle Back Queue |
Code |
 |
[Linked List, Design, Dequeue] |
| 1671 |
Minimum Number of Removals to Make Mountain Array |
Code |
 |
[Dynamic Programming] |
| 1672 |
Richest Customer Wealth |
Code |
 |
[Array] |
| 1673 |
Find the Most Competitive Subsequence |
Code |
 |
[Stack, Greedy] |
| 1674 |
Minimum Moves to Make Array Complementary |
Code |
 |
[Greedy] |
| 1675 |
Minimize Deviation in Array |
Code |
 |
[Heap, Ordered Map] |
| 1676 |
Lowest Common Ancestor of a Binary Tree IV |
Code |
 |
[Tree, Depth-first Search] |
| 1677 |
Product’s Worth Over Invoices |
Code |
 |
|
| 1678 |
Goal Parser Interpretation |
Code |
 |
[String] |
| 1679 |
Max Number of K-Sum Pairs |
Code |
 |
[Hash Table] |
| 1680 |
Concatenation of Consecutive Binary Numbers |
Code |
 |
[Math] |
| 1681 |
Minimum Incompatibility |
Code |
 |
[Backtracking, Greedy] |
| 1682 |
Longest Palindromic Subsequence II |
Code |
 |
[String, Dynamic Programming] |
| 1683 |
Invalid Tweets |
Code |
 |
|
| 1684 |
Count the Number of Consistent Strings |
Code |
 |
[String] |
| 1685 |
Sum of Absolute Differences in a Sorted Array |
Code |
 |
[Math, Greedy] |
| 1686 |
Stone Game VI |
Code |
 |
[Greedy] |
| 1687 |
Delivering Boxes from Storage to Ports |
Code |
 |
[Two Pointers, Dynamic Programming, Segment Tree, Dequeue] |
| 1688 |
Count of Matches in Tournament |
Code |
 |
[Backtracking] |
| 1689 |
Partitioning Into Minimum Number Of Deci-Binary Numbers |
Code |
 |
[Greedy] |
| 1690 |
Stone Game VII |
Code |
 |
[Dynamic Programming] |
| 1691 |
Maximum Height by Stacking Cuboids |
Code |
 |
[Dynamic Programming, Sort] |
| 1692 |
Count Ways to Distribute Candies |
Code |
 |
[Dynamic Programming] |
| 1693 |
Daily Leads and Partners |
Code |
 |
|
| 1694 |
Reformat Phone Number |
Code |
 |
[String] |
| 1695 |
Maximum Erasure Value |
Code |
 |
[Two Pointers] |
| 1696 |
Jump Game VI |
Code |
 |
[Dequeue] |
| 1697 |
Checking Existence of Edge Length Limited Paths |
Code |
 |
[Sort, Union Find] |
| 1698 |
Number of Distinct Substrings in a String |
Code |
 |
[String, Trie, Rolling Hash, Suffix Array] |
| 1699 |
Number of Calls Between Two Persons |
Code |
 |
|
| 1700 |
Number of Students Unable to Eat Lunch |
Code |
 |
[Array] |
| 1701 |
Average Waiting Time |
Code |
 |
[Array] |
| 1702 |
Maximum Binary String After Change |
Code |
 |
[Greedy] |
| 1703 |
Minimum Adjacent Swaps for K Consecutive Ones |
Code |
 |
[Stack] |
| 1704 |
Determine if String Halves Are Alike |
Code |
 |
[String] |
| 1705 |
Maximum Number of Eaten Apples |
Code |
 |
[Heap, Greedy] |
| 1706 |
Where Will the Ball Fall |
Code |
 |
[Dynamic Programming] |
| 1707 |
Maximum XOR With an Element From Array |
Code |
 |
[Bit Manipulation, Trie] |