Skip to content

Latest commit

 

History

History
1200 lines (1198 loc) · 242 KB

cpp.md

File metadata and controls

1200 lines (1198 loc) · 242 KB

C++

1194 (339 Easy; 653 Medium; 202 Hard) Problems listed.

# Problem Free? AC Rate Difficulty Tags Solutions
0001 Two Sum Free 46% Easy Array
Hash Table
Soln 1
Soln 2
Soln 3
0002 Add Two Numbers Free 35% Medium Linked List
Math
Soln 1
Soln 2
0003 Longest Substring Without Repeating Characters Free 31% Medium Hash Table
Two Pointers
String
Sliding Window
Soln 1
Soln 2
0004 Median of Two Sorted Arrays Free 30% Hard Array
Binary Search
Divide and Conquer
Soln 1
0005 Longest Palindromic Substring Free 30% Medium String
Dynamic Programming
Soln 1
Soln 2
0006 ZigZag Conversion Free 37% Medium String Soln 1
0007 Reverse Integer Free 26% Easy Math Soln 1
Soln 2
0008 String to Integer (atoi) Free 16% Medium Math
String
Soln 1
Soln 2
Soln 3
0009 Palindrome Number Free 49% Easy Math Soln 1
0010 Regular Expression Matching Free 27% Hard String
Dynamic Programming
Backtracking
Soln 1
Soln 2
Soln 3
0011 Container With Most Water Free 52% Medium Array
Two Pointers
Soln 1
0012 Integer to Roman Free 56% Medium Math
String
Soln 1
0013 Roman to Integer Free 56% Easy Math
String
Soln 1
0014 Longest Common Prefix Free 36% Easy String Soln 1
0015 3Sum Free 27% Medium Array
Two Pointers
Soln 1
Soln 2
0016 3Sum Closest Free 46% Medium Array
Two Pointers
Soln 1
Soln 2
0017 Letter Combinations of a Phone Number Free 48% Medium String
Backtracking
Soln 1
Soln 2
0018 4Sum Free 34% Medium Array
Hash Table
Two Pointers
Soln 1
Soln 2
0019 Remove Nth Node From End of List Free 35% Medium Linked List
Two Pointers
Soln 1
0020 Valid Parentheses Free 39% Easy String
Stack
Soln 1
0021 Merge Two Sorted Lists Free 55% Easy Linked List Soln 1
0022 Generate Parentheses Free 64% Medium String
Backtracking
Soln 1
Soln 2
0023 Merge k Sorted Lists Free 42% Hard Linked List
Divide and Conquer
Heap
Soln 1
Soln 2
Soln 3
0024 Swap Nodes in Pairs Free 52% Medium Linked List Soln 1
0025 Reverse Nodes in k-Group Free 44% Hard Linked List Soln 1
0026 Remove Duplicates from Sorted Array Free 46% Easy Array
Two Pointers
Soln 1
0027 Remove Element Free 49% Easy Array
Two Pointers
Soln 1
0028 Implement strStr() Free 35% Easy Two Pointers
String
Soln 1
Soln 2
Soln 3
0029 Divide Two Integers Free 17% Medium Math
Binary Search
Soln 1
Soln 2
0030 Substring with Concatenation of All Words Free 26% Hard Hash Table
Two Pointers
String
Soln 1
Soln 2
0031 Next Permutation Free 33% Medium Array Soln 1
Soln 2
0032 Longest Valid Parentheses Free 29% Hard String
Dynamic Programming
Soln 1
0033 Search in Rotated Sorted Array Free 35% Medium Array
Binary Search
Soln 1
Soln 2
0034 Find First and Last Position of Element in Sorted Array Free 37% Medium Array
Binary Search
Soln 1
Soln 2
Soln 3
Soln 4
Soln 5
0035 Search Insert Position Free 43% Easy Array
Binary Search
Soln 1
Soln 2
0036 Valid Sudoku Free 50% Medium Hash Table Soln 1
Soln 2
0037 Sudoku Solver Free 45% Hard Hash Table
Backtracking
Soln 1
0038 Count and Say Free 46% Easy String Soln 1
0039 Combination Sum Free 58% Medium Array
Backtracking
Soln 1
Soln 2
Soln 3
Soln 4
0040 Combination Sum II Free 50% Medium Array
Backtracking
Soln 1
Soln 2
0041 First Missing Positive Free 33% Hard Array Soln 1
0042 Trapping Rain Water Free 50% Hard Array
Two Pointers
Stack
Soln 1
Soln 2
Soln 3
0043 Multiply Strings Free 35% Medium Math
String
Soln 1
Soln 2
0045 Jump Game II Free 31% Hard Array
Greedy
Soln 1
Soln 2
Soln 3
0046 Permutations Free 65% Medium Backtracking Soln 1
Soln 2
Soln 3
Soln 4
0047 Permutations II Free 49% Medium Backtracking Soln 1
Soln 2
Soln 3
0048 Rotate Image Free 59% Medium Array Soln 1
0049 Group Anagrams Free 58% Medium Hash Table
String
Soln 1
Soln 2
Soln 3
Soln 4
0050 Pow(x, n) Free 31% Medium Math
Binary Search
Soln 1
Soln 2
Soln 3
0051 N-Queens Free 48% Hard Backtracking Soln 1
Soln 2
0052 N-Queens II Free 59% Hard Backtracking Soln 1
0053 Maximum Subarray Free 47% Easy Array
Divide and Conquer
Dynamic Programming
Soln 1
Soln 2
0054 Spiral Matrix Free 35% Medium Array Soln 1
Soln 2
0055 Jump Game Free 35% Medium Array
Greedy
Soln 1
Soln 2
Soln 3
0056 Merge Intervals Free 40% Medium Array
Sort
Soln 1
Soln 2
Soln 3
0057 Insert Interval Free 35% Medium Array
Sort
Soln 1
0058 Length of Last Word Free 33% Easy String Soln 1
0059 Spiral Matrix II Free 55% Medium Array Soln 1
Soln 2
0060 Permutation Sequence Free 39% Hard Math
Backtracking
Soln 1
0061 Rotate List Free 31% Medium Linked List
Two Pointers
Soln 1
0062 Unique Paths Free 55% Medium Array
Dynamic Programming
Soln 1
Soln 2
0063 Unique Paths II Free 35% Medium Array
Dynamic Programming
Soln 1
Soln 2
0064 Minimum Path Sum Free 56% Medium Array
Dynamic Programming
Soln 1
Soln 2
0065 Valid Number Free 16% Hard Math
String
Soln 1
0066 Plus One Free 43% Easy Array Soln 1
Soln 2
0067 Add Binary Free 46% Easy Math
String
Soln 1
Soln 2
0068 Text Justification Free 29% Hard String Soln 1
0069 Sqrt(x) Free 35% Easy Math
Binary Search
Soln 1
0070 Climbing Stairs Free 48% Easy Dynamic Programming Soln 1
0071 Simplify Path Free 33% Medium String
Stack
Soln 1
0072 Edit Distance Free 46% Hard String
Dynamic Programming
Soln 1
Soln 2
0073 Set Matrix Zeroes Free 44% Medium Array Soln 1
0074 Search a 2D Matrix Free 37% Medium Array
Binary Search
Soln 1
Soln 2
0075 Sort Colors Free 49% Medium Array
Two Pointers
Sort
Soln 1
Soln 2
Soln 3
0077 Combinations Free 56% Medium Backtracking Soln 1
Soln 2
Soln 3
0078 Subsets Free 64% Medium Array
Backtracking
Bit Manipulation
Soln 1
Soln 2
0079 Word Search Free 36% Medium Array
Backtracking
Soln 1
0080 Remove Duplicates from Sorted Array II Free 45% Medium Array
Two Pointers
Soln 1
0081 Search in Rotated Sorted Array II Free 33% Medium Array
Binary Search
Soln 1
0082 Remove Duplicates from Sorted List II Free 38% Medium Linked List Soln 1
0083 Remove Duplicates from Sorted List Free 46% Easy Linked List Soln 1
0084 Largest Rectangle in Histogram Free 36% Hard Array
Stack
Soln 1
0086 Partition List Free 43% Medium Linked List
Two Pointers
Soln 1
0087 Scramble String Free 34% Hard String
Dynamic Programming
Soln 1
0088 Merge Sorted Array Free 40% Easy Array
Two Pointers
Soln 1
Soln 2
0089 Gray Code Free 50% Medium Backtracking Soln 1
Soln 2
Soln 3
0090 Subsets II Free 48% Medium Array
Backtracking
Soln 1
0091 Decode Ways Free 26% Medium String
Dynamic Programming
Soln 1
Soln 2
0092 Reverse Linked List II Free 40% Medium Linked List Soln 1
0093 Restore IP Addresses Free 37% Medium String
Backtracking
Soln 1
0094 Binary Tree Inorder Traversal Free 65% Medium Hash Table
Stack
Tree
Soln 1
Soln 2
0095 Unique Binary Search Trees II Free 42% Medium Dynamic Programming
Tree
Soln 1
0096 Unique Binary Search Trees Free 54% Medium Dynamic Programming
Tree
Soln 1
Soln 2
0097 Interleaving String Free 32% Hard String
Dynamic Programming
Soln 1
Soln 2
0098 Validate Binary Search Tree Free 28% Medium Tree
Depth-first Search
Soln 1
Soln 2
Soln 3
0099 Recover Binary Search Tree Free 42% Hard Tree
Depth-first Search
Soln 1
Soln 2
Soln 3
0100 Same Tree Free 54% Easy Tree
Depth-first Search
Soln 1
0101 Symmetric Tree Free 48% Easy Tree
Depth-first Search
Breadth-first Search
Soln 1
0102 Binary Tree Level Order Traversal Free 56% Medium Tree
Breadth-first Search
Soln 1
Soln 2
Soln 3
0103 Binary Tree Zigzag Level Order Traversal Free 49% Medium Stack
Tree
Breadth-first Search
Soln 1
Soln 2
0104 Maximum Depth of Binary Tree Free 67% Easy Tree
Depth-first Search
Soln 1
0105 Construct Binary Tree from Preorder and Inorder Traversal Free 51% Medium Array
Tree
Depth-first Search
Soln 1
Soln 2
0106 Construct Binary Tree from Inorder and Postorder Traversal Free 49% Medium Array
Tree
Depth-first Search
Soln 1
0107 Binary Tree Level Order Traversal II Free 55% Easy Tree
Breadth-first Search
Soln 1
0108 Convert Sorted Array to Binary Search Tree Free 59% Easy Tree
Depth-first Search
Soln 1
Soln 2
0109 Convert Sorted List to Binary Search Tree Free 49% Medium Linked List
Depth-first Search
Soln 1
Soln 2
0110 Balanced Binary Tree Free 44% Easy Tree
Depth-first Search
Soln 1
0111 Minimum Depth of Binary Tree Free 39% Easy Tree
Depth-first Search
Breadth-first Search
Soln 1
0112 Path Sum Free 42% Easy Tree
Depth-first Search
Soln 1
Soln 2
0113 Path Sum II Free 48% Medium Tree
Depth-first Search
Soln 1
Soln 2
0114 Flatten Binary Tree to Linked List Free 51% Medium Tree
Depth-first Search
Soln 1
Soln 2
Soln 3
0115 Distinct Subsequences Free 39% Hard String
Dynamic Programming
Soln 1
Soln 2
0116 Populating Next Right Pointers in Each Node Free 48% Medium Tree
Depth-first Search
Soln 1
Soln 2
0117 Populating Next Right Pointers in Each Node II Free 40% Medium Tree
Depth-first Search
Soln 1
Soln 2
0118 Pascal's Triangle Free 54% Easy Array Soln 1
0119 Pascal's Triangle II Free 52% Easy Array Soln 1
0120 Triangle Free 45% Medium Array
Dynamic Programming
Soln 1
Soln 2
0121 Best Time to Buy and Sell Stock Free 51% Easy Array
Dynamic Programming
Soln 1
Soln 2
0122 Best Time to Buy and Sell Stock II Free 58% Easy Array
Greedy
Soln 1
0123 Best Time to Buy and Sell Stock III Free 39% Hard Array
Dynamic Programming
Soln 1
0125 Valid Palindrome Free 38% Easy Two Pointers
String
Soln 1
0126 Word Ladder II Free 23% Hard Array
String
Backtracking
Breadth-first Search
Soln 1
0127 Word Ladder Free 31% Medium Breadth-first Search Soln 1
Soln 2
Soln 3
Soln 4
0128 Longest Consecutive Sequence Free 46% Hard Array
Union Find
Soln 1
Soln 2
Soln 3
0129 Sum Root to Leaf Numbers Free 50% Medium Tree
Depth-first Search
Soln 1
0130 Surrounded Regions Free 29% Medium Depth-first Search
Breadth-first Search
Union Find
Soln 1
Soln 2
Soln 3
0131 Palindrome Partitioning Free 49% Medium Backtracking Soln 1
0132 Palindrome Partitioning II Free 31% Hard Dynamic Programming Soln 1
0133 Clone Graph Free 38% Medium Depth-first Search
Breadth-first Search
Graph
Soln 1
Soln 2
0134 Gas Station Free 41% Medium Greedy Soln 1
Soln 2
0135 Candy Free 32% Hard Greedy Soln 1
Soln 2
0136 Single Number Free 66% Easy Hash Table
Bit Manipulation
Soln 1
Soln 2
Soln 3
0137 Single Number II Free 53% Medium Bit Manipulation Soln 1
Soln 2
Soln 3
0138 Copy List with Random Pointer Free 39% Medium Hash Table
Linked List
Soln 1
Soln 2
0139 Word Break Free 41% Medium Dynamic Programming Soln 1
Soln 2
Soln 3
0141 Linked List Cycle Free 42% Easy Linked List
Two Pointers
Soln 1
Soln 2
Soln 3
0142 Linked List Cycle II Free 39% Medium Linked List
Two Pointers
Soln 1
0143 Reorder List Free 40% Medium Linked List Soln 1
0144 Binary Tree Preorder Traversal Free 57% Medium Stack
Tree
Soln 1
Soln 2
Soln 3
0145 Binary Tree Postorder Traversal Free 57% Medium Stack
Tree
Soln 1
Soln 2
Soln 3
0146 LRU Cache Free 35% Medium Design Soln 1
0147 Insertion Sort List Free 44% Medium Linked List
Sort
Soln 1
0148 Sort List Free 45% Medium Linked List
Sort
Soln 1
Soln 2
Soln 3
Soln 4
0149 Max Points on a Line Free 17% Hard Hash Table
Math
Soln 1
0150 Evaluate Reverse Polish Notation Free 37% Medium Stack Soln 1
Soln 2
0151 Reverse Words in a String Free 23% Medium String Soln 1
Soln 2
Soln 3
0152 Maximum Product Subarray Free 32% Medium Array
Dynamic Programming
Soln 1
Soln 2
Soln 3
0153 Find Minimum in Rotated Sorted Array Free 46% Medium Array
Binary Search
Soln 1
Soln 2
0154 Find Minimum in Rotated Sorted Array II Free 42% Hard Array
Binary Search
Soln 1
Soln 2
0155 Min Stack Free 46% Easy Stack
Design
Soln 1
0157 Read N Characters Given Read4 Paid 37% Easy Soln 1
0158 Read N Characters Given Read4 II - Call multiple times Paid 36% Hard Soln 1
0159 Longest Substring with At Most Two Distinct Characters Paid 50% Medium Soln 1
0160 Intersection of Two Linked Lists Free 42% Easy Linked List Soln 1
Soln 2
0161 One Edit Distance Paid 33% Medium Soln 1
0162 Find Peak Element Free 44% Medium Array
Binary Search
Soln 1
Soln 2
Soln 3
0163 Missing Ranges Paid 25% Easy Soln 1
Soln 2
0164 Maximum Gap Free 36% Hard Sort Soln 1
0165 Compare Version Numbers Free 30% Medium String Soln 1
0166 Fraction to Recurring Decimal Free 22% Medium Hash Table
Math
Soln 1
Soln 2
0167 Two Sum II - Input array is sorted Free 55% Easy Array
Two Pointers
Binary Search
Soln 1
Soln 2
0168 Excel Sheet Column Title Free 31% Easy Math Soln 1
0169 Majority Element Free 60% Easy Array
Divide and Conquer
Bit Manipulation
Soln 1
Soln 2
0170 Two Sum III - Data structure design Paid 35% Easy Soln 1
Soln 2
0171 Excel Sheet Column Number Free 57% Easy Math Soln 1
0172 Factorial Trailing Zeroes Free 38% Easy Math Soln 1
0173 Binary Search Tree Iterator Free 58% Medium Stack
Tree
Design
Soln 1
Soln 2
Soln 3
0174 Dungeon Game Free 33% Hard Binary Search
Dynamic Programming
Soln 1
0179 Largest Number Free 30% Medium Sort Soln 1
0186 Reverse Words in a String II Paid 45% Medium Soln 1
0187 Repeated DNA Sequences Free 41% Medium Hash Table
Bit Manipulation
Soln 1
Soln 2
0189 Rotate Array Free 36% Medium Array Soln 1
0190 Reverse Bits Free 41% Easy Bit Manipulation Soln 1
Soln 2
0191 Number of 1 Bits Free 51% Easy Bit Manipulation Soln 1
0198 House Robber Free 43% Easy Dynamic Programming Soln 1
Soln 2
0199 Binary Tree Right Side View Free 55% Medium Tree
Depth-first Search
Breadth-first Search
Soln 1
0200 Number of Islands Free 48% Medium Depth-first Search
Breadth-first Search
Union Find
Soln 1
Soln 2
0201 Bitwise AND of Numbers Range Free 40% Medium Bit Manipulation Soln 1
0202 Happy Number Free 51% Easy Hash Table
Math
Soln 1
Soln 2
0203 Remove Linked List Elements Free 39% Easy Linked List Soln 1
Soln 2
0204 Count Primes Free 32% Easy Hash Table
Math
Soln 1
Soln 2
0205 Isomorphic Strings Free 40% Easy Hash Table Soln 1
Soln 2
0206 Reverse Linked List Free 64% Easy Linked List Soln 1
Soln 2
Soln 3
0207 Course Schedule Free 44% Medium Depth-first Search
Breadth-first Search
Graph
Topological Sort
Soln 1
Soln 2
Soln 3
0208 Implement Trie (Prefix Tree) Free 51% Medium Design
Trie
Soln 1
Soln 2
Soln 3
0209 Minimum Size Subarray Sum Free 39% Medium Array
Two Pointers
Binary Search
Soln 1
Soln 2
0210 Course Schedule II Free 42% Medium Depth-first Search
Breadth-first Search
Graph
Topological Sort
Soln 1
Soln 2
Soln 3
Soln 4
0211 Design Add and Search Words Data Structure Free 39% Medium Backtracking
Design
Trie
Soln 1
0212 Word Search II Free 36% Hard Backtracking
Trie
Soln 1
0213 House Robber II Free 37% Medium Dynamic Programming Soln 1
Soln 2
0214 Shortest Palindrome Free 30% Hard String Soln 1
0215 Kth Largest Element in an Array Free 57% Medium Divide and Conquer
Heap
Soln 1
Soln 2
0216 Combination Sum III Free 60% Medium Array
Backtracking
Soln 1
0217 Contains Duplicate Free 56% Easy Array
Hash Table
Soln 1
Soln 2
Soln 3
0218 The Skyline Problem Free 36% Hard Divide and Conquer
Heap
Binary Indexed Tree
Segment Tree
Line Sweep
Soln 1
0219 Contains Duplicate II Free 38% Easy Array
Hash Table
Soln 1
0220 Contains Duplicate III Free 21% Medium Sort
Ordered Map
Soln 1
0221 Maximal Square Free 38% Medium Dynamic Programming Soln 1
Soln 2
0222 Count Complete Tree Nodes Free 48% Medium Binary Search
Tree
Soln 1
Soln 2
0224 Basic Calculator Free 38% Hard Math
Stack
Soln 1
0225 Implement Stack using Queues Free 47% Easy Stack
Design
Soln 1
Soln 2
0226 Invert Binary Tree Free 66% Easy Tree Soln 1
Soln 2
0227 Basic Calculator II Free 38% Medium String Soln 1
0228 Summary Ranges Free 42% Easy Array Soln 1
Soln 2
0229 Majority Element II Free 38% Medium Array Soln 1
0230 Kth Smallest Element in a BST Free 62% Medium Binary Search
Tree
Soln 1
Soln 2
0231 Power of Two Free 44% Easy Math
Bit Manipulation
Soln 1
0232 Implement Queue using Stacks Free 51% Easy Stack
Design
Soln 1
Soln 2
0233 Number of Digit One Free 32% Hard Math Soln 1
0234 Palindrome Linked List Free 40% Easy Linked List
Two Pointers
Soln 1
Soln 2
0235 Lowest Common Ancestor of a Binary Search Tree Free 51% Easy Tree Soln 1
0236 Lowest Common Ancestor of a Binary Tree Free 48% Medium Tree Soln 1
Soln 2
0237 Delete Node in a Linked List Free 66% Easy Linked List Soln 1
0238 Product of Array Except Self Free 61% Medium Array Soln 1
Soln 2
0239 Sliding Window Maximum Free 44% Hard Heap
Sliding Window
Soln 1
0240 Search a 2D Matrix II Free 44% Medium Binary Search
Divide and Conquer
Soln 1
Soln 2
0241 Different Ways to Add Parentheses Free 57% Medium Divide and Conquer Soln 1
Soln 2
Soln 3
Soln 4
0242 Valid Anagram Free 58% Easy Hash Table
Sort
Soln 1
Soln 2
Soln 3
Soln 4
0243 Shortest Word Distance Paid 62% Easy Soln 1
Soln 2
Soln 3
0244 Shortest Word Distance II Paid 53% Medium Soln 1
Soln 2
0245 Shortest Word Distance III Paid 56% Medium Soln 1
0246 Strobogrammatic Number Paid 45% Easy Soln 1
0247 Strobogrammatic Number II Paid 48% Medium Soln 1
Soln 2
0248 Strobogrammatic Number III Paid 40% Hard Soln 1
Soln 2
0249 Group Shifted Strings Paid 57% Medium Soln 1
0250 Count Univalue Subtrees Paid 53% Medium Soln 1
0251 Flatten 2D Vector Paid 46% Medium Soln 1
0252 Meeting Rooms Paid 55% Easy Soln 1
0253 Meeting Rooms II Paid 46% Medium Soln 1
Soln 2
Soln 3
Soln 4
Soln 5
0254 Factor Combinations Paid 47% Medium Soln 1
Soln 2
0255 Verify Preorder Sequence in Binary Search Tree Paid 46% Medium Soln 1
0256 Paint House Paid 53% Medium Soln 1
0257 Binary Tree Paths Free 53% Easy Tree
Depth-first Search
Soln 1
0258 Add Digits Free 58% Easy Math Soln 1
0259 3Sum Smaller Paid 48% Medium Soln 1
0260 Single Number III Free 65% Medium Bit Manipulation Soln 1
Soln 2
0261 Graph Valid Tree Paid 43% Medium Soln 1
0263 Ugly Number Free 42% Easy Math Soln 1
Soln 2
0264 Ugly Number II Free 43% Medium Math
Dynamic Programming
Heap
Soln 1
0266 Palindrome Permutation Paid 62% Easy Soln 1
Soln 2
0267 Palindrome Permutation II Paid 37% Medium Soln 1
0268 Missing Number Free 53% Easy Array
Math
Bit Manipulation
Soln 1
0270 Closest Binary Search Tree Value Paid 49% Easy Soln 1
0271 Encode and Decode Strings Paid 32% Medium Soln 1
0272 Closest Binary Search Tree Value II Paid 51% Hard Soln 1
0273 Integer to English Words Free 28% Hard Math
String
Soln 1
0274 H-Index Free 36% Medium Hash Table
Sort
Soln 1
Soln 2
0275 H-Index II Free 36% Medium Binary Search Soln 1
Soln 2
0276 Paint Fence Paid 39% Easy Soln 1
0277 Find the Celebrity Paid 43% Medium Soln 1
Soln 2
0278 First Bad Version Free 37% Easy Binary Search Soln 1
Soln 2
0279 Perfect Squares Free 48% Medium Math
Dynamic Programming
Breadth-first Search
Soln 1
Soln 2
Soln 3
Soln 4
Soln 5
0280 Wiggle Sort Paid 64% Medium Soln 1
Soln 2
0281 Zigzag Iterator Paid 59% Medium Soln 1
0282 Expression Add Operators Free 36% Hard Divide and Conquer Soln 1
Soln 2
0283 Move Zeroes Free 58% Easy Array
Two Pointers
Soln 1
Soln 2
0284 Peeking Iterator Free 47% Medium Design Soln 1
0285 Inorder Successor in BST Paid 42% Medium Soln 1
Soln 2
Soln 3
Soln 4
0286 Walls and Gates Paid 56% Medium Soln 1
Soln 2
Soln 3
0287 Find the Duplicate Number Free 57% Medium Array
Two Pointers
Binary Search
Soln 1
Soln 2
Soln 3
0288 Unique Word Abbreviation Paid 23% Medium Soln 1
Soln 2
0289 Game of Life Free 56% Medium Array Soln 1
0290 Word Pattern Free 38% Easy Hash Table Soln 1
0292 Nim Game Free 55% Easy Brainteaser
Minimax
Soln 1
0293 Flip Game Paid 61% Easy Soln 1
0294 Flip Game II Paid 50% Medium Soln 1
0295 Find Median from Data Stream Free 46% Hard Heap
Design
Soln 1
0296 Best Meeting Point Paid 58% Hard Soln 1
0297 Serialize and Deserialize Binary Tree Free 49% Hard Tree
Design
Soln 1
Soln 2
0298 Binary Tree Longest Consecutive Sequence Paid 48% Medium Soln 1
Soln 2
Soln 3
0299 Bulls and Cows Free 44% Medium Hash Table Soln 1
Soln 2
0300 Longest Increasing Subsequence Free 43% Medium Binary Search
Dynamic Programming
Soln 1
Soln 2
Soln 3
Soln 4
0301 Remove Invalid Parentheses Free 44% Hard Depth-first Search
Breadth-first Search
Soln 1
0302 Smallest Rectangle Enclosing Black Pixels Paid 52% Hard Soln 1
0303 Range Sum Query - Immutable Free 46% Easy Dynamic Programming Soln 1
0304 Range Sum Query 2D - Immutable Free 40% Medium Dynamic Programming Soln 1
0305 Number of Islands II Paid 40% Hard Soln 1
Soln 2
0306 Additive Number Free 29% Medium Backtracking Soln 1
0307 Range Sum Query - Mutable Free 36% Medium Binary Indexed Tree
Segment Tree
Soln 1
Soln 2
Soln 3
Soln 4
Soln 5
0308 Range Sum Query 2D - Mutable Paid 37% Hard Soln 1
Soln 2
0309 Best Time to Buy and Sell Stock with Cooldown Free 48% Medium Dynamic Programming Soln 1
Soln 2
0310 Minimum Height Trees Free 34% Medium Breadth-first Search
Graph
Soln 1
0311 Sparse Matrix Multiplication Paid 63% Medium Soln 1
Soln 2
Soln 3
0312 Burst Balloons Free 53% Hard Divide and Conquer
Dynamic Programming
Soln 1
0313 Super Ugly Number Free 46% Medium Math
Heap
Soln 1
0314 Binary Tree Vertical Order Traversal Paid 46% Medium Soln 1
0316 Remove Duplicate Letters Free 39% Medium Stack
Greedy
Soln 1
Soln 2
0318 Maximum Product of Word Lengths Free 52% Medium Bit Manipulation Soln 1
Soln 2
Soln 3
0319 Bulb Switcher Free 45% Medium Math
Brainteaser
Soln 1
0320 Generalized Abbreviation Paid 53% Medium Soln 1
Soln 2
0322 Coin Change Free 37% Medium Dynamic Programming Soln 1
0323 Number of Connected Components in an Undirected Graph Paid 57% Medium Soln 1
0325 Maximum Size Subarray Sum Equals k Paid 47% Medium Soln 1
Soln 2
0326 Power of Three Free 42% Easy Math Soln 1
0328 Odd Even Linked List Free 57% Medium Linked List Soln 1
Soln 2
0329 Longest Increasing Path in a Matrix Free 44% Hard Depth-first Search
Topological Sort
Memoization
Soln 1
Soln 2
0330 Patching Array Free 35% Hard Greedy Soln 1
0331 Verify Preorder Serialization of a Binary Tree Free 41% Medium Stack
0332 Reconstruct Itinerary Free 37% Medium Depth-first Search
Graph
Soln 1
Soln 2
0333 Largest BST Subtree Paid 37% Medium Soln 1
Soln 2
0334 Increasing Triplet Subsequence Free 40% Medium Soln 1
Soln 2
0337 House Robber III Free 52% Medium Tree
Depth-first Search
Soln 1
Soln 2
0338 Counting Bits Free 70% Medium Dynamic Programming
Bit Manipulation
Soln 1
Soln 2
Soln 3
0339 Nested List Weight Sum Paid 75% Easy Soln 1
0340 Longest Substring with At Most K Distinct Characters Paid 45% Hard Soln 1
0341 Flatten Nested List Iterator Free 54% Medium Stack
Design
Soln 1
Soln 2
0342 Power of Four Free 41% Easy Bit Manipulation Soln 1
0343 Integer Break Free 51% Medium Math
Dynamic Programming
Soln 1
0344 Reverse String Free 70% Easy Two Pointers
String
Soln 1
Soln 2
0345 Reverse Vowels of a String Free 45% Easy Two Pointers
String
Soln 1
Soln 2
0346 Moving Average from Data Stream Paid 73% Easy Soln 1
0347 Top K Frequent Elements Free 62% Medium Hash Table
Heap
Soln 1
0348 Design Tic-Tac-Toe Paid 55% Medium Soln 1
0349 Intersection of Two Arrays Free 64% Easy Hash Table
Two Pointers
Binary Search
Sort
Soln 1
Soln 2
0350 Intersection of Two Arrays II Free 52% Easy Hash Table
Two Pointers
Binary Search
Sort
Soln 1
Soln 2
0352 Data Stream as Disjoint Intervals Free 48% Hard Binary Search
Ordered Map
Soln 1
Soln 2
Soln 3
Soln 4
0353 Design Snake Game Paid 35% Medium Soln 1
0354 Russian Doll Envelopes Free 36% Hard Binary Search
Dynamic Programming
Soln 1
Soln 2
0356 Line Reflection Paid 32% Medium Soln 1
Soln 2
0357 Count Numbers with Unique Digits Free 49% Medium Math
Dynamic Programming
Backtracking
Soln 1
0358 Rearrange String k Distance Apart Paid 35% Hard Soln 1
0359 Logger Rate Limiter Paid 72% Easy Soln 1
0360 Sort Transformed Array Paid 49% Medium Soln 1
0361 Bomb Enemy Paid 46% Medium Soln 1
0362 Design Hit Counter Paid 65% Medium Soln 1
Soln 2
0363 Max Sum of Rectangle No Larger Than K Free 38% Hard Binary Search
Dynamic Programming
Queue
Soln 1
Soln 2
0364 Nested List Weight Sum II Paid 63% Medium Soln 1
Soln 2
0366 Find Leaves of Binary Tree Paid 71% Medium Soln 1
Soln 2
Soln 3
0367 Valid Perfect Square Free 42% Easy Math
Binary Search
Soln 1
Soln 2
0368 Largest Divisible Subset Free 38% Medium Math
Dynamic Programming
Soln 1
Soln 2
Soln 3
0369 Plus One Linked List Paid 59% Medium Soln 1
Soln 2
Soln 3
0370 Range Addition Paid 63% Medium Soln 1
Soln 2
0371 Sum of Two Integers Free 51% Medium Bit Manipulation Soln 1
0372 Super Pow Free 37% Medium Math Soln 1
0374 Guess Number Higher or Lower Free 44% Easy Binary Search Soln 1
0375 Guess Number Higher or Lower II Free 42% Medium Dynamic Programming
Minimax
Soln 1
Soln 2
0376 Wiggle Subsequence Free 40% Medium Dynamic Programming
Greedy
Soln 1
Soln 2
0377 Combination Sum IV Free 46% Medium Dynamic Programming Soln 1
0378 Kth Smallest Element in a Sorted Matrix Free 56% Medium Binary Search
Heap
Soln 1
0379 Design Phone Directory Paid 47% Medium Soln 1
Soln 2
0380 Insert Delete GetRandom O(1) Free 48% Medium Array
Hash Table
Design
Soln 1
Soln 2
0381 Insert Delete GetRandom O(1) - Duplicates allowed Free 35% Hard Array
Hash Table
Design
Soln 1
0382 Linked List Random Node Free 54% Medium Reservoir Sampling Soln 1
Soln 2
Soln 3
0383 Ransom Note Free 53% Easy String Soln 1
0384 Shuffle an Array Free 54% Medium Soln 1
0385 Mini Parser Free 34% Medium String
Stack
Soln 1
0386 Lexicographical Numbers Free 53% Medium Soln 1
Soln 2
0387 First Unique Character in a String Free 54% Easy Hash Table
String
Soln 1
Soln 2
0388 Longest Absolute File Path Free 42% Medium Soln 1
0389 Find the Difference Free 58% Easy Hash Table
Bit Manipulation
Soln 1
Soln 2
0391 Perfect Rectangle Free 31% Hard Line Sweep Soln 1
0392 Is Subsequence Free 49% Easy Binary Search
Dynamic Programming
Greedy
Soln 1
0393 UTF-8 Validation Free 38% Medium Bit Manipulation
0394 Decode String Free 52% Medium Stack
Depth-first Search
Soln 1
Soln 2
0395 Longest Substring with At Least K Repeating Characters Free 43% Medium Soln 1
Soln 2
0396 Rotate Function Free 37% Medium Math Soln 1
Soln 2
0397 Integer Replacement Free 33% Medium Math
Bit Manipulation
Soln 1
Soln 2
0398 Random Pick Index Free 57% Medium Reservoir Sampling Soln 1
Soln 2
Soln 3
Soln 4
0399 Evaluate Division Free 54% Medium Union Find
Graph
Soln 1
Soln 2
0400 Nth Digit Free 32% Medium Math Soln 1
0401 Binary Watch Free 48% Easy Backtracking
Bit Manipulation
Soln 1
Soln 2
0402 Remove K Digits Free 29% Medium Stack
Greedy
Soln 1
Soln 2
0403 Frog Jump Free 41% Hard Dynamic Programming Soln 1
Soln 2
Soln 3
0404 Sum of Left Leaves Free 52% Easy Tree Soln 1
0405 Convert a Number to Hexadecimal Free 44% Easy Bit Manipulation Soln 1
0406 Queue Reconstruction by Height Free 68% Medium Greedy Soln 1
Soln 2
Soln 3
0407 Trapping Rain Water II Free 43% Hard Heap
Breadth-first Search
Soln 1
Soln 2
0408 Valid Word Abbreviation Paid 31% Easy Soln 1
Soln 2
0409 Longest Palindrome Free 52% Easy Hash Table Soln 1
0410 Split Array Largest Sum Free 46% Hard Binary Search
Dynamic Programming
Soln 1
0412 Fizz Buzz Free 63% Easy Soln 1
0413 Arithmetic Slices Free 58% Medium Math
Dynamic Programming
Soln 1
Soln 2
Soln 3
0414 Third Maximum Number Free 31% Easy Array Soln 1
Soln 2
0415 Add Strings Free 48% Easy String Soln 1
Soln 2
0416 Partition Equal Subset Sum Free 45% Medium Dynamic Programming Soln 1
Soln 2
Soln 3
Soln 4
Soln 5
Soln 6
0417 Pacific Atlantic Water Flow Free 42% Medium Depth-first Search
Breadth-first Search
Soln 1
Soln 2
0418 Sentence Screen Fitting Paid 33% Medium Soln 1
0419 Battleships in a Board Free 71% Medium Soln 1
0421 Maximum XOR of Two Numbers in an Array Free 54% Medium Bit Manipulation
Trie
Soln 1
0422 Valid Word Square Paid 38% Easy Soln 1
Soln 2
0424 Longest Repeating Character Replacement Free 48% Medium Two Pointers
Sliding Window
Soln 1
0425 Word Squares Paid 50% Hard Soln 1
0426 Convert Binary Search Tree to Sorted Doubly Linked List Paid 60% Medium Soln 1
Soln 2
0428 Serialize and Deserialize N-ary Tree Paid 61% Hard Soln 1
Soln 2
0429 N-ary Tree Level Order Traversal Free 66% Medium Tree
Breadth-first Search
Soln 1
Soln 2
0430 Flatten a Multilevel Doubly Linked List Free 56% Medium Linked List
Depth-first Search
Soln 1
Soln 2
Soln 3
Soln 4
0433 Minimum Genetic Mutation Free 43% Medium Soln 1
0434 Number of Segments in a String Free 38% Easy String Soln 1
0435 Non-overlapping Intervals Free 44% Medium Greedy Soln 1
0436 Find Right Interval Free 48% Medium Binary Search Soln 1
0437 Path Sum III Free 48% Medium Tree Soln 1
Soln 2
0438 Find All Anagrams in a String Free 44% Medium Hash Table Soln 1
Soln 2
Soln 3
0439 Ternary Expression Parser Paid 56% Medium Soln 1
Soln 2
0441 Arranging Coins Free 42% Easy Math
Binary Search
Soln 1
Soln 2
0442 Find All Duplicates in an Array Free 68% Medium Array Soln 1
Soln 2
0443 String Compression Free 43% Medium String Soln 1
0444 Sequence Reconstruction Paid 23% Medium Soln 1
Soln 2
0445 Add Two Numbers II Free 56% Medium Linked List Soln 1
Soln 2
Soln 3
0446 Arithmetic Slices II - Subsequence Free 33% Hard Dynamic Programming Soln 1
0447 Number of Boomerangs Free 52% Medium Hash Table Soln 1
0448 Find All Numbers Disappeared in an Array Free 56% Easy Array Soln 1
0449 Serialize and Deserialize BST Free 54% Medium Tree Soln 1
0450 Delete Node in a BST Free 45% Medium Tree Soln 1
Soln 2
0451 Sort Characters By Frequency Free 64% Medium Hash Table
Heap
Soln 1
0452 Minimum Number of Arrows to Burst Balloons Free 50% Medium Greedy Soln 1
0453 Minimum Moves to Equal Array Elements Free 51% Easy Math Soln 1
0454 4Sum II Free 54% Medium Hash Table
Binary Search
Soln 1
Soln 2
0455 Assign Cookies Free 50% Easy Greedy Soln 1
0456 132 Pattern Free 31% Medium Stack Soln 1
0457 Circular Array Loop Free 30% Medium Array
Two Pointers
Soln 1
0459 Repeated Substring Pattern Free 43% Easy String Soln 1
0461 Hamming Distance Free 73% Easy Bit Manipulation Soln 1
Soln 2
Soln 3
0462 Minimum Moves to Equal Array Elements II Free 54% Medium Math Soln 1
0463 Island Perimeter Free 66% Easy Hash Table Soln 1
0464 Can I Win Free 29% Medium Dynamic Programming
Minimax
Soln 1
Soln 2
Soln 3
0465 Optimal Account Balancing Paid 48% Hard Soln 1
0466 Count The Repetitions Free 29% Hard Dynamic Programming Soln 1
0467 Unique Substrings in Wraparound String Free 36% Medium Dynamic Programming Soln 1
0469 Convex Polygon Paid 37% Medium Soln 1
0470 Implement Rand10() Using Rand7() Free 46% Medium Random
Rejection Sampling
Soln 1
0471 Encode String with Shortest Length Paid 49% Hard Soln 1
Soln 2
0473 Matchsticks to Square Free 38% Medium Depth-first Search Soln 1
0474 Ones and Zeroes Free 43% Medium Dynamic Programming Soln 1
0475 Heaters Free 33% Medium Binary Search Soln 1
Soln 2
Soln 3
0476 Number Complement Free 65% Easy Bit Manipulation Soln 1
Soln 2
0477 Total Hamming Distance Free 51% Medium Bit Manipulation Soln 1
Soln 2
Soln 3
0480 Sliding Window Median Free 38% Hard Sliding Window Soln 1
0481 Magical String Free 48% Medium Soln 1
0482 License Key Formatting Free 43% Easy Soln 1
0484 Find Permutation Paid 64% Medium Soln 1
0485 Max Consecutive Ones Free 53% Easy Array Soln 1
Soln 2
0486 Predict the Winner Free 48% Medium Dynamic Programming
Minimax
Soln 1
0487 Max Consecutive Ones II Paid 48% Medium Soln 1
0488 Zuma Game Free 39% Hard Depth-first Search Soln 1
0489 Robot Room Cleaner Paid 72% Hard Soln 1
Soln 2
0490 The Maze Paid 52% Medium Soln 1
Soln 2
0491 Increasing Subsequences Free 47% Medium Depth-first Search Soln 1
0492 Construct the Rectangle Free 50% Easy Soln 1
0493 Reverse Pairs Free 26% Hard Binary Search
Divide and Conquer
Sort
Binary Indexed Tree
Segment Tree
Soln 1
Soln 2
Soln 3
0494 Target Sum Free 46% Medium Dynamic Programming
Depth-first Search
Soln 1
Soln 2
Soln 3
0495 Teemo Attacking Free 56% Medium Array Soln 1
0496 Next Greater Element I Free 65% Easy Stack Soln 1
Soln 2
Soln 3
0497 Random Point in Non-overlapping Rectangles Free 39% Medium Binary Search
Random
Soln 1
Soln 2
0498 Diagonal Traverse Free 49% Medium Soln 1
Soln 2
0500 Keyboard Row Free 65% Easy Hash Table Soln 1
Soln 2
0501 Find Mode in Binary Search Tree Free 43% Easy Tree Soln 1
0502 IPO Free 41% Hard Heap
Greedy
Soln 1
Soln 2
0503 Next Greater Element II Free 58% Medium Stack Soln 1
0504 Base 7 Free 46% Easy Soln 1
Soln 2
0506 Relative Ranks Free 51% Easy Soln 1
Soln 2
0507 Perfect Number Free 36% Easy Math Soln 1
0508 Most Frequent Subtree Sum Free 59% Medium Hash Table
Tree
Soln 1
0509 Fibonacci Number Free 67% Easy Array Soln 1
0510 Inorder Successor in BST II Paid 60% Medium Soln 1
0513 Find Bottom Left Tree Value Free 62% Medium Tree
Depth-first Search
Breadth-first Search
Soln 1
0514 Freedom Trail Free 45% Hard Divide and Conquer
Dynamic Programming
Depth-first Search
Soln 1
0515 Find Largest Value in Each Tree Row Free 62% Medium Tree
Depth-first Search
Breadth-first Search
Soln 1
Soln 2
0516 Longest Palindromic Subsequence Free 55% Medium Dynamic Programming Soln 1
Soln 2
0517 Super Washing Machines Free 38% Hard Math
Dynamic Programming
Soln 1
0518 Coin Change 2 Free 51% Medium Soln 1
0519 Random Flip Matrix Free 37% Medium Random Soln 1
0520 Detect Capital Free 54% Easy String Soln 1
0521 Longest Uncommon Subsequence I Free 58% Easy String Soln 1
0523 Continuous Subarray Sum Free 25% Medium Math
Dynamic Programming
Soln 1
0524 Longest Word in Dictionary through Deleting Free 49% Medium Two Pointers
Sort
Soln 1
Soln 2
Soln 3
0525 Contiguous Array Free 43% Medium Hash Table Soln 1
Soln 2
0526 Beautiful Arrangement Free 59% Medium Backtracking Soln 1
0528 Random Pick with Weight Free 44% Medium Binary Search
Random
Soln 1
Soln 2
0529 Minesweeper Free 60% Medium Depth-first Search
Breadth-first Search
Soln 1
0530 Minimum Absolute Difference in BST Free 54% Easy Tree Soln 1
Soln 2
0531 Lonely Pixel I Paid 59% Medium Soln 1
Soln 2
0532 K-diff Pairs in an Array Free 35% Medium Array
Two Pointers
0535 Encode and Decode TinyURL Free 81% Medium Hash Table
Math
Soln 1
0536 Construct Binary Tree from String Paid 50% Medium Soln 1
0537 Complex Number Multiplication Free 68% Medium Math
String
Soln 1
Soln 2
0538 Convert BST to Greater Tree Free 56% Medium Tree Soln 1
Soln 2
0539 Minimum Time Difference Free 52% Medium String Soln 1
0540 Single Element in a Sorted Array Free 58% Medium Soln 1
Soln 2
0541 Reverse String II Free 49% Easy String Soln 1
0542 01 Matrix Free 40% Medium Depth-first Search
Breadth-first Search
Soln 1
0543 Diameter of Binary Tree Free 49% Easy Tree Soln 1
Soln 2
0544 Output Contest Matches Paid 76% Medium Soln 1
0547 Friend Circles Free 60% Medium Depth-first Search
Union Find
Soln 1
Soln 2
0549 Binary Tree Longest Consecutive Sequence II Paid 47% Medium Soln 1
0551 Student Attendance Record I Free 46% Easy String Soln 1
Soln 2
0552 Student Attendance Record II Free 37% Hard Dynamic Programming Soln 1
0553 Optimal Division Free 57% Medium Math
String
Soln 1
0554 Brick Wall Free 50% Medium Hash Table
0556 Next Greater Element III Free 32% Medium String Soln 1
Soln 2
0557 Reverse Words in a String III Free 71% Easy String Soln 1
0559 Maximum Depth of N-ary Tree Free 69% Easy Tree
Depth-first Search
Breadth-first Search
Soln 1
0560 Subarray Sum Equals K Free 44% Medium Array
Hash Table
Soln 1
Soln 2
0561 Array Partition I Free 73% Easy Array Soln 1
Soln 2
0562 Longest Line of Consecutive One in Matrix Paid 46% Medium Soln 1
0563 Binary Tree Tilt Free 52% Easy Tree Soln 1
0565 Array Nesting Free 56% Medium Array Soln 1
0566 Reshape the Matrix Free 61% Easy Array Soln 1
0567 Permutation in String Free 44% Medium Two Pointers
Sliding Window
Soln 1
Soln 2
Soln 3
0572 Subtree of Another Tree Free 44% Easy Tree Soln 1
0573 Squirrel Simulation Paid 56% Medium Soln 1
0575 Distribute Candies Free 62% Easy Hash Table Soln 1
0581 Shortest Unsorted Continuous Subarray Free 31% Medium Array Soln 1
0582 Kill Process Paid 62% Medium Soln 1
0583 Delete Operation for Two Strings Free 49% Medium String Soln 1
Soln 2
0589 N-ary Tree Preorder Traversal Free 73% Easy Tree Soln 1
Soln 2
0590 N-ary Tree Postorder Traversal Free 73% Easy Tree Soln 1
Soln 2
0593 Valid Square Free 43% Medium Math Soln 1
Soln 2
0594 Longest Harmonious Subsequence Free 47% Easy Hash Table Soln 1
0598 Range Addition II Free 50% Easy Math Soln 1
0599 Minimum Index Sum of Two Lists Free 51% Easy Hash Table Soln 1
0604 Design Compressed String Iterator Paid 38% Easy Soln 1
0605 Can Place Flowers Free 31% Easy Array Soln 1
0606 Construct String from Binary Tree Free 55% Easy String
Tree
Soln 1
0609 Find Duplicate File in System Free 61% Medium Hash Table
String
Soln 1
Soln 2
0611 Valid Triangle Number Free 49% Medium Array Soln 1
0616 Add Bold Tag in String Paid 44% Medium Soln 1
Soln 2
0617 Merge Two Binary Trees Free 75% Easy Tree Soln 1
0621 Task Scheduler Free 51% Medium Array
Greedy
Queue
Soln 1
Soln 2
0623 Add One Row to Tree Free 50% Medium Tree Soln 1
0624 Maximum Distance in Arrays Paid 39% Medium Soln 1
0625 Minimum Factorization Paid 33% Medium Soln 1
0628 Maximum Product of Three Numbers Free 47% Easy Array
Math
Soln 1
0630 Course Schedule III Free 34% Hard Greedy Soln 1
0632 Smallest Range Covering Elements from K Lists Free 54% Hard Hash Table
Two Pointers
String
Soln 1
0633 Sum of Square Numbers Free 32% Medium Math Soln 1
0634 Find the Derangement of An Array Paid 40% Medium Soln 1
0636 Exclusive Time of Functions Free 53% Medium Stack Soln 1
Soln 2
Soln 3
0637 Average of Levels in Binary Tree Free 64% Easy Tree Soln 1
0638 Shopping Offers Free 52% Medium Dynamic Programming
Depth-first Search
Soln 1
0639 Decode Ways II Free 27% Hard Dynamic Programming Soln 1
0641 Design Circular Deque Free 55% Medium Design
Queue
Soln 1
0642 Design Search Autocomplete System Paid 46% Hard Soln 1
0643 Maximum Average Subarray I Free 42% Easy Array Soln 1
0644 Maximum Average Subarray II Paid 34% Hard Soln 1
0645 Set Mismatch Free 42% Easy Hash Table
Math
Soln 1
Soln 2
0646 Maximum Length of Pair Chain Free 52% Medium Dynamic Programming Soln 1
0647 Palindromic Substrings Free 61% Medium String
Dynamic Programming
Soln 1
0649 Dota2 Senate Free 39% Medium Greedy Soln 1
0650 2 Keys Keyboard Free 50% Medium Dynamic Programming Soln 1
0652 Find Duplicate Subtrees Free 51% Medium Tree Soln 1
Soln 2
0653 Two Sum IV - Input is a BST Free 56% Easy Tree Soln 1
Soln 2
0654 Maximum Binary Tree Free 81% Medium Tree Soln 1
0656 Coin Path Paid 29% Hard Soln 1
Soln 2
0657 Robot Return to Origin Free 73% Easy String Soln 1
Soln 2
Soln 3
0658 Find K Closest Elements Free 42% Medium Binary Search Soln 1
0659 Split Array into Consecutive Subsequences Free 44% Medium Heap
Greedy
Soln 1
Soln 2
Soln 3
0660 Remove 9 Paid 54% Hard Soln 1
0661 Image Smoother Free 52% Easy Array Soln 1
0662 Maximum Width of Binary Tree Free 40% Medium Tree Soln 1
0663 Equal Tree Partition Paid 40% Medium Soln 1
0665 Non-decreasing Array Free 20% Easy Array Soln 1
0666 Path Sum IV Paid 55% Medium Soln 1
0668 Kth Smallest Number in Multiplication Table Free 47% Hard Binary Search Soln 1
Soln 2
0669 Trim a Binary Search Tree Free 63% Easy Tree Soln 1
0670 Maximum Swap Free 45% Medium Array
Math
Soln 1
Soln 2
0671 Second Minimum Node In a Binary Tree Free 43% Easy Tree Soln 1
0673 Number of Longest Increasing Subsequence Free 38% Medium Dynamic Programming Soln 1
Soln 2
0674 Longest Continuous Increasing Subsequence Free 46% Easy Array Soln 1
Soln 2
0675 Cut Off Trees for Golf Event Free 35% Hard Breadth-first Search Soln 1
Soln 2
0676 Implement Magic Dictionary Free 55% Medium Hash Table
Trie
Soln 1
0677 Map Sum Pairs Free 54% Medium Trie Soln 1
Soln 2
0678 Valid Parenthesis String Free 31% Medium String Soln 1
0679 24 Game Free 47% Hard Depth-first Search Soln 1
0680 Valid Palindrome II Free 37% Easy String Soln 1
0681 Next Closest Time Paid 46% Medium Soln 1
0682 Baseball Game Free 65% Easy Stack Soln 1
0683 K Empty Slots Paid 36% Hard Soln 1
Soln 2
0684 Redundant Connection Free 58% Medium Tree
Union Find
Graph
Soln 1
Soln 2
Soln 3
0685 Redundant Connection II Free 33% Hard Tree
Depth-first Search
Union Find
Graph
Soln 1
0686 Repeated String Match Free 33% Medium String Soln 1
0687 Longest Univalue Path Free 37% Medium Tree
Recursion
Soln 1
0688 Knight Probability in Chessboard Free 50% Medium Dynamic Programming Soln 1
0689 Maximum Sum of 3 Non-Overlapping Subarrays Free 47% Hard Array
Dynamic Programming
Soln 1
0690 Employee Importance Free 58% Easy Hash Table
Depth-first Search
Breadth-first Search
Soln 1
Soln 2
0691 Stickers to Spell Word Free 44% Hard Dynamic Programming
Backtracking
Soln 1
0692 Top K Frequent Words Free 53% Medium Hash Table
Heap
Trie
Soln 1
Soln 2
0693 Binary Number with Alternating Bits Free 60% Easy Bit Manipulation Soln 1
0694 Number of Distinct Islands Paid 57% Medium Soln 1
0695 Max Area of Island Free 64% Medium Array
Depth-first Search
Soln 1
0696 Count Binary Substrings Free 57% Easy String Soln 1
0697 Degree of an Array Free 54% Easy Array Soln 1
Soln 2
0698 Partition to K Equal Sum Subsets Free 45% Medium Dynamic Programming
Recursion
Soln 1
0699 Falling Squares Free 42% Hard Segment Tree
Ordered Map
Soln 1
0700 Search in a Binary Search Tree Free 73% Easy Tree Soln 1
0701 Insert into a Binary Search Tree Free 76% Medium Tree Soln 1
0702 Search in a Sorted Array of Unknown Size Paid 68% Medium Soln 1
Soln 2
0703 Kth Largest Element in a Stream Free 50% Easy Heap Soln 1
0704 Binary Search Free 54% Easy Binary Search Soln 1
0705 Design HashSet Free 64% Easy Hash Table
Design
Soln 1
0706 Design HashMap Free 62% Easy Hash Table
Design
Soln 1
0708 Insert into a Sorted Circular Linked List Paid 32% Medium Soln 1
Soln 2
Soln 3
0709 To Lower Case Free 80% Easy String Soln 1
0710 Random Pick with Blacklist Free 33% Hard Hash Table
Binary Search
Sort
Random
Soln 1
Soln 2
0711 Number of Distinct Islands II Paid 49% Hard Soln 1
0712 Minimum ASCII Delete Sum for Two Strings Free 59% Medium Dynamic Programming Soln 1
Soln 2
0713 Subarray Product Less Than K Free 40% Medium Array
Two Pointers
Soln 1
Soln 2
0714 Best Time to Buy and Sell Stock with Transaction Fee Free 56% Medium Array
Dynamic Programming
Greedy
Soln 1
Soln 2
0715 Range Module Free 40% Hard Segment Tree
Ordered Map
Soln 1
Soln 2
0716 Max Stack Paid 43% Easy Soln 1
0717 1-bit and 2-bit Characters Free 48% Easy Array Soln 1
Soln 2
Soln 3
0718 Maximum Length of Repeated Subarray Free 50% Medium Array
Hash Table
Binary Search
Dynamic Programming
Soln 1
0719 Find K-th Smallest Pair Distance Free 32% Hard Array
Binary Search
Heap
Soln 1
Soln 2
0720 Longest Word in Dictionary Free 49% Easy Hash Table
Trie
Soln 1
0722 Remove Comments Free 36% Medium String Soln 1
Soln 2
0723 Candy Crush Paid 72% Medium Soln 1
0724 Find Pivot Index Free 45% Easy Array Soln 1
0725 Split Linked List in Parts Free 53% Medium Linked List Soln 1
0726 Number of Atoms Free 51% Hard Hash Table
Stack
Recursion
Soln 1
0727 Minimum Window Subsequence Paid 42% Hard Soln 1
Soln 2
0728 Self Dividing Numbers Free 75% Easy Math Soln 1
0729 My Calendar I Free 53% Medium Array Soln 1
Soln 2
0731 My Calendar II Free 50% Medium Ordered Map Soln 1
Soln 2
Soln 3
Soln 4
0732 My Calendar III Free 61% Hard Segment Tree
Ordered Map
Soln 1
Soln 2
Soln 3
Soln 4
0733 Flood Fill Free 56% Easy Depth-first Search Soln 1
0734 Sentence Similarity Paid 42% Easy Soln 1
0735 Asteroid Collision Free 43% Medium Stack Soln 1
0737 Sentence Similarity II Paid 46% Medium Soln 1
Soln 2
Soln 3
0738 Monotone Increasing Digits Free 45% Medium Greedy Soln 1
Soln 2
0739 Daily Temperatures Free 64% Medium Hash Table
Stack
Soln 1
Soln 2
0740 Delete and Earn Free 49% Medium Dynamic Programming Soln 1
0741 Cherry Pickup Free 35% Hard Dynamic Programming Soln 1
Soln 2
0742 Closest Leaf in a Binary Tree Paid 44% Medium Soln 1
0743 Network Delay Time Free 45% Medium Heap
Depth-first Search
Breadth-first Search
Graph
Soln 1
Soln 2
Soln 3
0744 Find Smallest Letter Greater Than Target Free 46% Easy Binary Search Soln 1
0746 Min Cost Climbing Stairs Free 51% Easy Array
Dynamic Programming
Soln 1
Soln 2
0747 Largest Number At Least Twice of Others Free 43% Easy Array Soln 1
Soln 2
0748 Shortest Completing Word Free 57% Easy Hash Table Soln 1
0750 Number Of Corner Rectangles Paid 67% Medium Soln 1
Soln 2
0752 Open the Lock Free 52% Medium Breadth-first Search Soln 1
0753 Cracking the Safe Free 52% Hard Math
Depth-first Search
Soln 1
0755 Pour Water Paid 44% Medium Soln 1
0756 Pyramid Transition Matrix Free 55% Medium Bit Manipulation
Depth-first Search
Soln 1
0758 Bold Words in String Paid 47% Easy Soln 1
0759 Employee Free Time Paid 67% Hard Soln 1
Soln 2
Soln 3
0760 Find Anagram Mappings Paid 82% Easy Soln 1
0761 Special Binary String Free 59% Hard String
Recursion
Soln 1
0762 Prime Number of Set Bits in Binary Representation Free 64% Easy Bit Manipulation Soln 1
0763 Partition Labels Free 78% Medium Two Pointers
Greedy
Soln 1
Soln 2
0764 Largest Plus Sign Free 46% Medium Dynamic Programming Soln 1
0765 Couples Holding Hands Free 55% Hard Greedy
Union Find
Graph
Soln 1
Soln 2
0766 Toeplitz Matrix Free 66% Easy Array Soln 1
0767 Reorganize String Free 50% Medium String
Heap
Greedy
Sort
Soln 1
Soln 2
0768 Max Chunks To Make Sorted II Free 50% Hard Array Soln 1
Soln 2
0769 Max Chunks To Make Sorted Free 55% Medium Array Soln 1
Soln 2
0771 Jewels and Stones Free 87% Easy Hash Table Soln 1
0772 Basic Calculator III Paid 43% Hard Soln 1
Soln 2
0774 Minimize Max Distance to Gas Station Paid 48% Hard Soln 1
Soln 2
0775 Global and Local Inversions Free 42% Medium Array
Math
Soln 1
0776 Split BST Paid 56% Medium Soln 1
Soln 2
0777 Swap Adjacent in LR String Free 35% Medium Brainteaser Soln 1
Soln 2
0778 Swim in Rising Water Free 54% Hard Binary Search
Heap
Depth-first Search
Union Find
Soln 1
Soln 2
0779 K-th Symbol in Grammar Free 38% Medium Recursion Soln 1
0781 Rabbits in Forest Free 55% Medium Hash Table
Math
Soln 1
0783 Minimum Distance Between BST Nodes Free 53% Easy Tree
Recursion
Soln 1
Soln 2
0784 Letter Case Permutation Free 66% Medium Backtracking
Bit Manipulation
Soln 1
Soln 2
0785 Is Graph Bipartite? Free 48% Medium Depth-first Search
Breadth-first Search
Graph
Soln 1
0786 K-th Smallest Prime Fraction Free 41% Hard Binary Search
Heap
Soln 1
Soln 2
0787 Cheapest Flights Within K Stops Free 39% Medium Dynamic Programming
Heap
Breadth-first Search
Soln 1
Soln 2
0788 Rotated Digits Free 57% Easy String Soln 1
0789 Escape The Ghosts Free 58% Medium Math Soln 1
0790 Domino and Tromino Tiling Free 40% Medium Dynamic Programming Soln 1
0791 Custom Sort String Free 66% Medium String Soln 1
0792 Number of Matching Subsequences Free 48% Medium Array Soln 1
Soln 2
Soln 3
0793 Preimage Size of Factorial Zeroes Function Free 40% Hard Binary Search Soln 1
Soln 2
0795 Number of Subarrays with Bounded Maximum Free 47% Medium Array Soln 1
0796 Rotate String Free 49% Easy Soln 1
Soln 2
0797 All Paths From Source to Target Free 78% Medium Soln 1
Soln 2
0799 Champagne Tower Free 44% Medium Soln 1
Soln 2
0800 Similar RGB Color Paid 62% Easy Soln 1
0801 Minimum Swaps To Make Sequences Increasing Free 39% Medium Dynamic Programming Soln 1
Soln 2
0802 Find Eventual Safe States Free 49% Medium Depth-first Search
Graph
Soln 1
0804 Unique Morse Code Words Free 79% Easy String Soln 1
Soln 2
0805 Split Array With Same Average Free 27% Hard Math Soln 1
0806 Number of Lines To Write String Free 65% Easy Soln 1
0807 Max Increase to Keep City Skyline Free 84% Medium Soln 1
0809 Expressive Words Free 47% Medium String Soln 1
Soln 2
0810 Chalkboard XOR Game Free 49% Hard Math Soln 1
0811 Subdomain Visit Count Free 71% Easy Hash Table Soln 1
0812 Largest Triangle Area Free 59% Easy Math Soln 1
0813 Largest Sum of Averages Free 51% Medium Dynamic Programming Soln 1
Soln 2
0814 Binary Tree Pruning Free 73% Medium Tree Soln 1
0815 Bus Routes Free 43% Hard Breadth-first Search Soln 1
Soln 2
0816 Ambiguous Coordinates Free 48% Medium String Soln 1
0817 Linked List Components Free 57% Medium Linked List Soln 1
Soln 2
0819 Most Common Word Free 45% Easy String Soln 1
0821 Shortest Distance to a Character Free 68% Easy Soln 1
Soln 2
0822 Card Flipping Game Free 43% Medium Soln 1
0823 Binary Trees With Factors Free 36% Medium Soln 1
Soln 2
0824 Goat Latin Free 66% Easy String Soln 1
0826 Most Profit Assigning Work Free 39% Medium Two Pointers Soln 1
Soln 2
0828 Count Unique Characters of All Substrings of a Given String Free 47% Hard Two Pointers Soln 1
0829 Consecutive Numbers Sum Free 39% Hard Math Soln 1
0830 Positions of Large Groups Free 50% Easy Array Soln 1
Soln 2
0831 Masking Personal Information Free 45% Medium String Soln 1
0832 Flipping an Image Free 78% Easy Array Soln 1
Soln 2
Soln 3
0833 Find And Replace in String Free 51% Medium String Soln 1
Soln 2
Soln 3
0834 Sum of Distances in Tree Free 45% Hard Tree
Depth-first Search
Soln 1
Soln 2
0835 Image Overlap Free 62% Medium Array Soln 1
Soln 2
0836 Rectangle Overlap Free 46% Easy Math Soln 1
0837 New 21 Game Free 35% Medium Dynamic Programming Soln 1
0838 Push Dominoes Free 49% Medium Two Pointers
Dynamic Programming
Soln 1
0839 Similar String Groups Free 39% Hard Depth-first Search
Union Find
Graph
Soln 1
Soln 2
0841 Keys and Rooms Free 65% Medium Depth-first Search
Graph
Soln 1
Soln 2
Soln 3
0842 Split Array into Fibonacci Sequence Free 37% Medium String
Backtracking
Greedy
Soln 1
0843 Guess the Word Free 46% Hard Minimax Soln 1
Soln 2
0844 Backspace String Compare Free 47% Easy Two Pointers
Stack
Soln 1
Soln 2
0845 Longest Mountain in Array Free 38% Medium Two Pointers Soln 1
0846 Hand of Straights Free 55% Medium Ordered Map Soln 1
Soln 2
0847 Shortest Path Visiting All Nodes Free 53% Hard Dynamic Programming
Breadth-first Search
Soln 1
Soln 2
0848 Shifting Letters Free 45% Medium String Soln 1
0849 Maximize Distance to Closest Person Free 44% Medium Array Soln 1
0850 Rectangle Area II Free 48% Hard Segment Tree
Line Sweep
Soln 1
0851 Loud and Rich Free 52% Medium Depth-first Search Soln 1
Soln 2
0852 Peak Index in a Mountain Array Free 72% Easy Binary Search Soln 1
0853 Car Fleet Free 43% Medium Sort Soln 1
Soln 2
0855 Exam Room Free 43% Medium Ordered Map Soln 1
Soln 2
0856 Score of Parentheses Free 62% Medium String
Stack
Soln 1
Soln 2
0857 Minimum Cost to Hire K Workers Free 50% Hard Heap Soln 1
Soln 2
0858 Mirror Reflection Free 59% Medium Math Soln 1
0859 Buddy Strings Free 30% Easy String Soln 1
0860 Lemonade Change Free 52% Easy Greedy Soln 1
Soln 2
0861 Score After Flipping Matrix Free 73% Medium Greedy Soln 1
Soln 2
0862 Shortest Subarray with Sum at Least K Free 25% Hard Binary Search
Queue
Soln 1
0863 All Nodes Distance K in Binary Tree Free 57% Medium Tree
Depth-first Search
Breadth-first Search
Soln 1
0865 Smallest Subtree with all the Deepest Nodes Free 62% Medium Tree Soln 1
Soln 2
0867 Transpose Matrix Free 62% Easy Array Soln 1
0868 Binary Gap Free 61% Easy Math Soln 1
Soln 2
0869 Reordered Power of 2 Free 54% Medium Math Soln 1
0870 Advantage Shuffle Free 46% Medium Array
Greedy
Soln 1
0871 Minimum Number of Refueling Stops Free 32% Hard Dynamic Programming
Heap
Soln 1
0872 Leaf-Similar Trees Free 65% Easy Tree
Depth-first Search
Soln 1
Soln 2
0873 Length of Longest Fibonacci Subsequence Free 48% Medium Array
Dynamic Programming
Soln 1
0874 Walking Robot Simulation Free 36% Easy Greedy Soln 1
0875 Koko Eating Bananas Free 53% Medium Binary Search Soln 1
Soln 2
0876 Middle of the Linked List Free 69% Easy Linked List Soln 1
0877 Stone Game Free 66% Medium Math
Dynamic Programming
Minimax
Soln 1
0878 Nth Magical Number Free 29% Hard Math
Binary Search
Soln 1
Soln 2
0880 Decoded String at Index Free 25% Medium Stack Soln 1
0881 Boats to Save People Free 47% Medium Two Pointers
Greedy
Soln 1
0882 Reachable Nodes In Subdivided Graph Free 42% Hard Heap Soln 1
0883 Projection Area of 3D Shapes Free 68% Easy Math Soln 1
Soln 2
0884 Uncommon Words from Two Sentences Free 64% Easy Hash Table Soln 1
0885 Spiral Matrix III Free 70% Medium Math Soln 1
0886 Possible Bipartition Free 45% Medium Depth-first Search Soln 1
0888 Fair Candy Swap Free 59% Easy Array Soln 1
Soln 2
0889 Construct Binary Tree from Preorder and Postorder Traversal Free 67% Medium Tree Soln 1
Soln 2
0890 Find and Replace Pattern Free 74% Medium String Soln 1
Soln 2
0892 Surface Area of 3D Shapes Free 59% Easy Math
Geometry
Soln 1
0893 Groups of Special-Equivalent Strings Free 68% Easy String Soln 1
0894 All Possible Full Binary Trees Free 77% Medium Tree
Recursion
Soln 1
Soln 2
0895 Maximum Frequency Stack Free 62% Hard Hash Table
Stack
Soln 1
0896 Monotonic Array Free 58% Easy Array Soln 1
Soln 2
0897 Increasing Order Search Tree Free 74% Easy Tree
Depth-first Search
Soln 1
0898 Bitwise ORs of Subarrays Free 34% Medium Dynamic Programming
Bit Manipulation
Soln 1
0899 Orderly Queue Free 53% Hard Math
String
Soln 1
Soln 2
0900 RLE Iterator Free 55% Medium Array Soln 1
Soln 2
Soln 3
0901 Online Stock Span Free 61% Medium Stack Soln 1
Soln 2
Soln 3
0902 Numbers At Most N Given Digit Set Free 36% Hard Math
Dynamic Programming
Soln 1
Soln 2
0904 Fruit Into Baskets Free 43% Medium Two Pointers Soln 1
Soln 2
0905 Sort Array By Parity Free 75% Easy Array Soln 1
0907 Sum of Subarray Minimums Free 33% Medium Array
Stack
Soln 1
0908 Smallest Range I Free 66% Easy Math Soln 1
Soln 2
0910 Smallest Range II Free 27% Medium Math
Greedy
Soln 1
Soln 2
Soln 3
Soln 4
0911 Online Election Free 51% Medium Binary Search Soln 1
Soln 2
0914 X of a Kind in a Deck of Cards Free 34% Easy Array
Math
Soln 1
Soln 2
Soln 3
0915 Partition Array into Disjoint Intervals Free 46% Medium Array
0916 Word Subsets Free 48% Medium String Soln 1
Soln 2
0917 Reverse Only Letters Free 58% Easy String Soln 1
Soln 2
0918 Maximum Sum Circular Subarray Free 34% Medium Array Soln 1
Soln 2
0919 Complete Binary Tree Inserter Free 58% Medium Tree Soln 1
Soln 2
0921 Minimum Add to Make Parentheses Valid Free 74% Medium Stack
Greedy
Soln 1
Soln 2
0922 Sort Array By Parity II Free 70% Easy Array
Sort
Soln 1
Soln 2
0923 3Sum With Multiplicity Free 36% Medium Two Pointers Soln 1
Soln 2
0924 Minimize Malware Spread Free 42% Hard Depth-first Search
Union Find
Soln 1
0925 Long Pressed Name Free 39% Easy Two Pointers
String
Soln 1
Soln 2
0926 Flip String to Monotone Increasing Free 53% Medium Array Soln 1
0929 Unique Email Addresses Free 67% Easy String Soln 1
Soln 2
0930 Binary Subarrays With Sum Free 44% Medium Hash Table
Two Pointers
Soln 1
Soln 2
0931 Minimum Falling Path Sum Free 63% Medium Dynamic Programming Soln 1
0932 Beautiful Array Free 61% Medium Divide and Conquer Soln 1
0933 Number of Recent Calls Free 72% Easy Queue Soln 1
Soln 2
Soln 3
0934 Shortest Bridge Free 49% Medium Depth-first Search
Breadth-first Search
Soln 1
Soln 2
0936 Stamping The Sequence Free 47% Hard String
Greedy
Soln 1
Soln 2
0937 Reorder Data in Log Files Free 54% Easy String Soln 1
0938 Range Sum of BST Free 83% Easy Tree
Recursion
Soln 1
0939 Minimum Area Rectangle Free 52% Medium Hash Table Soln 1
Soln 2
Soln 3
Soln 4
0940 Distinct Subsequences II Free 41% Hard Dynamic Programming Soln 1
Soln 2
0941 Valid Mountain Array Free 32% Easy Array Soln 1
Soln 2
Soln 3
0942 DI String Match Free 73% Easy Math Soln 1
0943 Find the Shortest Superstring Free 43% Hard Dynamic Programming Soln 1
0944 Delete Columns to Make Sorted Free 71% Easy Greedy Soln 1
0945 Minimum Increment to Make Array Unique Free 47% Medium Array Soln 1
Soln 2
0946 Validate Stack Sequences Free 63% Medium Stack Soln 1
0947 Most Stones Removed with Same Row or Column Free 55% Medium Depth-first Search
Union Find
Soln 1
Soln 2
0948 Bag of Tokens Free 46% Medium Greedy Soln 1
0949 Largest Time for Given Digits Free 36% Medium Math Soln 1
0950 Reveal Cards In Increasing Order Free 75% Medium Array Soln 1
Soln 2
0951 Flip Equivalent Binary Trees Free 66% Medium Tree Soln 1
Soln 2
Soln 3
0952 Largest Component Size by Common Factor Free 36% Hard Math
Union Find
Soln 1
Soln 2
Soln 3
Soln 4
0953 Verifying an Alien Dictionary Free 53% Easy Hash Table Soln 1
0954 Array of Doubled Pairs Free 35% Medium Array
Hash Table
Soln 1
0955 Delete Columns to Make Sorted II Free 33% Medium Greedy Soln 1
Soln 2
0956 Tallest Billboard Free 40% Hard Dynamic Programming Soln 1
Soln 2
0957 Prison Cells After N Days Free 40% Medium Hash Table Soln 1
0958 Check Completeness of a Binary Tree Free 52% Medium Tree Soln 1
0959 Regions Cut By Slashes Free 67% Medium Depth-first Search
Union Find
Graph
Soln 1
0961 N-Repeated Element in Size 2N Array Free 74% Easy Hash Table Soln 1
Soln 2
0962 Maximum Width Ramp Free 46% Medium Array Soln 1
0963 Minimum Area Rectangle II Free 51% Medium Math
Geometry
Soln 1
Soln 2
0965 Univalued Binary Tree Free 68% Easy Tree Soln 1
Soln 2
0967 Numbers With Same Consecutive Differences Free 44% Medium Dynamic Programming Soln 1
0968 Binary Tree Cameras Free 38% Hard Dynamic Programming
Tree
Depth-first Search
Soln 1
Soln 2
0969 Pancake Sorting Free 68% Medium Array
Sort
Soln 1
0970 Powerful Integers Free 40% Easy Hash Table
Math
Soln 1
0973 K Closest Points to Origin Free 64% Medium Divide and Conquer
Heap
Sort
Soln 1
Soln 2
0974 Subarray Sums Divisible by K Free 50% Medium Array
Hash Table
Soln 1
0975 Odd Even Jump Free 42% Hard Dynamic Programming
Stack
Ordered Map
Soln 1
0976 Largest Perimeter Triangle Free 58% Easy Math
Sort
Soln 1
Soln 2
0977 Squares of a Sorted Array Free 72% Easy Array
Two Pointers
Soln 1
0978 Longest Turbulent Subarray Free 47% Medium Array
Dynamic Programming
Sliding Window
Soln 1
Soln 2
0979 Distribute Coins in Binary Tree Free 69% Medium Tree
Depth-first Search
Soln 1
0980 Unique Paths III Free 77% Hard Backtracking
Depth-first Search
Soln 1
0981 Time Based Key-Value Store Free 54% Medium Hash Table
Binary Search
Soln 1
Soln 2
Soln 3
0982 Triples with Bitwise AND Equal To Zero Free 56% Hard Dynamic Programming Soln 1
Soln 2
Soln 3
0983 Minimum Cost For Tickets Free 63% Medium Dynamic Programming Soln 1
Soln 2
0984 String Without AAA or BBB Free 38% Medium Greedy Soln 1
Soln 2
0985 Sum of Even Numbers After Queries Free 61% Easy Array Soln 1
Soln 2
0986 Interval List Intersections Free 68% Medium Two Pointers Soln 1
Soln 2
Soln 3
Soln 4
0987 Vertical Order Traversal of a Binary Tree Free 37% Medium Hash Table
Tree
Soln 1
Soln 2
Soln 3
0988 Smallest String Starting From Leaf Free 46% Medium Tree
Depth-first Search
Soln 1
Soln 2
0989 Add to Array-Form of Integer Free 45% Easy Array Soln 1
0990 Satisfiability of Equality Equations Free 46% Medium Union Find
Graph
Soln 1
Soln 2
0991 Broken Calculator Free 46% Medium Math
Greedy
Soln 1
0992 Subarrays with K Different Integers Free 50% Hard Hash Table
Two Pointers
Sliding Window
Soln 1
0993 Cousins in Binary Tree Free 52% Easy Tree
Breadth-first Search
Soln 1
Soln 2
0994 Rotting Oranges Free 49% Medium Breadth-first Search Soln 1
Soln 2
0995 Minimum Number of K Consecutive Bit Flips Free 49% Hard Greedy
Sliding Window
Soln 1
Soln 2
Soln 3
0996 Number of Squareful Arrays Free 48% Hard Math
Backtracking
Graph
Soln 1
0997 Find the Town Judge Free 50% Easy Graph Soln 1
0998 Maximum Binary Tree II Free 64% Medium Tree Soln 1
0999 Available Captures for Rook Free 67% Easy Array Soln 1
1001 Grid Illumination Free 36% Hard Hash Table Soln 1
1002 Find Common Characters Free 68% Easy Array
Hash Table
Soln 1
1003 Check If Word Is Valid After Substitutions Free 56% Medium String
Stack
Soln 1
1004 Max Consecutive Ones III Free 60% Medium Two Pointers
Sliding Window
Soln 1
1005 Maximize Sum Of Array After K Negations Free 52% Easy Greedy Soln 1
1006 Clumsy Factorial Free 54% Medium Math Soln 1
1007 Minimum Domino Rotations For Equal Row Free 51% Medium Array
Greedy
Soln 1
Soln 2
1008 Construct Binary Search Tree from Preorder Traversal Free 79% Medium Tree Soln 1
1009 Complement of Base 10 Integer Free 62% Easy Math Soln 1
1010 Pairs of Songs With Total Durations Divisible by 60 Free 48% Medium Array Soln 1
1011 Capacity To Ship Packages Within D Days Free 59% Medium Array
Binary Search
Soln 1
Soln 2
1012 Numbers With Repeated Digits Free 38% Hard Math
Dynamic Programming
Soln 1
Soln 2
Soln 3
1013 Partition Array Into Three Parts With Equal Sum Free 50% Easy Array Soln 1
1014 Best Sightseeing Pair Free 53% Medium Array Soln 1
1015 Smallest Integer Divisible by K Free 42% Medium Math Soln 1
Soln 2
1016 Binary String With Substrings Representing 1 To N Free 59% Medium String Soln 1
1017 Convert to Base -2 Free 59% Medium Math Soln 1
1018 Binary Prefix Divisible By 5 Free 48% Easy Array Soln 1
Soln 2
1019 Next Greater Node In Linked List Free 58% Medium Linked List
Stack
Soln 1
Soln 2
1020 Number of Enclaves Free 59% Medium Depth-first Search Soln 1
1021 Remove Outermost Parentheses Free 79% Easy Stack Soln 1
1022 Sum of Root To Leaf Binary Numbers Free 71% Easy Tree Soln 1
1023 Camelcase Matching Free 57% Medium String
Trie
Soln 1
1024 Video Stitching Free 49% Medium Dynamic Programming Soln 1
1025 Divisor Game Free 66% Easy Math
Dynamic Programming
Soln 1
1026 Maximum Difference Between Node and Ancestor Free 69% Medium Tree
Depth-first Search
Soln 1
1027 Longest Arithmetic Subsequence Free 50% Medium Dynamic Programming Soln 1
Soln 2
Soln 3
1028 Recover a Tree From Preorder Traversal Free 70% Hard Tree
Depth-first Search
Soln 1
Soln 2
1029 Two City Scheduling Free 57% Medium Greedy Soln 1
1030 Matrix Cells in Distance Order Free 67% Easy Sort Soln 1
1031 Maximum Sum of Two Non-Overlapping Subarrays Free 59% Medium Array Soln 1
Soln 2
1032 Stream of Characters Free 48% Hard Trie Soln 1
Soln 2
Soln 3
1033 Moving Stones Until Consecutive Free 43% Easy Brainteaser Soln 1
1034 Coloring A Border Free 45% Medium Depth-first Search Soln 1
1035 Uncrossed Lines Free 56% Medium Array Soln 1
Soln 2
1036 Escape a Large Maze Free 35% Hard Breadth-first Search Soln 1
Soln 2
1038 Binary Search Tree to Greater Sum Tree Free 82% Medium Binary Search Tree Soln 1
1041 Robot Bounded In Circle Free 54% Medium Math Soln 1
Soln 2
1042 Flower Planting With No Adjacent Free 48% Medium Graph Soln 1
1043 Partition Array for Maximum Sum Free 66% Medium Graph Soln 1
1044 Longest Duplicate Substring Free 32% Hard Hash Table
Binary Search
Soln 1
1046 Last Stone Weight Free 62% Easy Heap
Greedy
Soln 1
1047 Remove All Adjacent Duplicates In String Free 70% Easy Stack Soln 1
Soln 2
1048 Longest String Chain Free 55% Medium Hash Table
Dynamic Programming
Soln 1
Soln 2
1049 Last Stone Weight II Free 44% Medium Dynamic Programming Soln 1
Soln 2
Soln 3
1051 Height Checker Free 72% Easy Array Soln 1
1052 Grumpy Bookstore Owner Free 55% Medium Array
Sliding Window
Soln 1
1053 Previous Permutation With One Swap Free 51% Medium Array
Greedy
Soln 1
1054 Distant Barcodes Free 44% Medium Heap
Sort
Soln 1
1055 Shortest Way to Form String Paid 57% Medium Soln 1
1056 Confusing Number Paid 47% Easy Soln 1
1057 Campus Bikes Paid 58% Medium Soln 1
Soln 2
1059 All Paths from Source Lead to Destination Paid 43% Medium Soln 1
1060 Missing Element in Sorted Array Paid 54% Medium Soln 1
1061 Lexicographically Smallest Equivalent String Paid 66% Medium Soln 1
1062 Longest Repeating Substring Paid 58% Medium Soln 1
1063 Number of Valid Subarrays Paid 72% Hard Soln 1
Soln 2
1064 Fixed Point Paid 66% Easy Soln 1
1065 Index Pairs of a String Paid 61% Easy Soln 1
1066 Campus Bikes II Paid 54% Medium Soln 1
Soln 2
1071 Greatest Common Divisor of Strings Free 52% Easy String Soln 1
1072 Flip Columns For Maximum Number of Equal Rows Free 61% Medium Hash Table Soln 1
1073 Adding Two Negabinary Numbers Free 35% Medium Math Soln 1
1074 Number of Submatrices That Sum to Target Free 61% Hard Array
Dynamic Programming
Sliding Window
Soln 1
Soln 2
1078 Occurrences After Bigram Free 65% Easy Hash Table Soln 1
1079 Letter Tile Possibilities Free 76% Medium Backtracking Soln 1
1080 Insufficient Nodes in Root to Leaf Paths Free 50% Medium Depth-first Search Soln 1
1081 Smallest Subsequence of Distinct Characters Free 53% Medium String Soln 1
1085 Sum of Digits in the Minimum Number Paid 75% Easy Soln 1
1086 High Five Paid 79% Easy Soln 1
1087 Brace Expansion Paid 63% Medium Soln 1
Soln 2
1088 Confusing Number II Paid 45% Hard Soln 1
Soln 2
1089 Duplicate Zeros Free 52% Easy Array Soln 1
1090 Largest Values From Labels Free 60% Medium Hash Table
Greedy
Soln 1
1091 Shortest Path in Binary Matrix Free 39% Medium Breadth-first Search Soln 1
Soln 2
1092 Shortest Common Supersequence Free 53% Hard Dynamic Programming Soln 1
Soln 2
Soln 3
1093 Statistics from a Large Sample Free 49% Medium Math
Two Pointers
Soln 1
1095 Find in Mountain Array Free 36% Hard Binary Search Soln 1
1096 Brace Expansion II Free 62% Hard String Soln 1
1099 Two Sum Less Than K Paid 61% Easy Soln 1
1100 Find K-Length Substrings With No Repeated Characters Paid 73% Medium Soln 1
1101 The Earliest Moment When Everyone Become Friends Paid 67% Medium Soln 1
1102 Path With Maximum Minimum Value Paid 50% Medium Soln 1
Soln 2
Soln 3
Soln 4
1106 Parsing A Boolean Expression Free 59% Hard String Soln 1
1108 Defanging an IP Address Free 88% Easy String Soln 1
1109 Corporate Flight Bookings Free 54% Medium Array
Math
Soln 1
Soln 2
1110 Delete Nodes And Return Forest Free 67% Medium Tree
Depth-first Search
Soln 1
Soln 2
1111 Maximum Nesting Depth of Two Valid Parentheses Strings Free 72% Medium Binary Search
Greedy
Soln 1
1118 Number of Days in a Month Paid 57% Easy Soln 1
1119 Remove Vowels from a String Paid 90% Easy Soln 1
1120 Maximum Average Subtree Paid 63% Medium Soln 1
1121 Divide Array Into Increasing Sequences Paid 58% Hard Soln 1
1122 Relative Sort Array Free 68% Easy Array
Sort
Soln 1
1123 Lowest Common Ancestor of Deepest Leaves Free 67% Medium Tree
Depth-first Search
Soln 1
1124 Longest Well-Performing Interval Free 33% Medium Stack Soln 1
1125 Smallest Sufficient Team Free 47% Hard Dynamic Programming
Bit Manipulation
Soln 1
Soln 2
1133 Largest Unique Number Paid 67% Easy Soln 1
1134 Armstrong Number Paid 78% Easy Soln 1
1135 Connecting Cities With Minimum Cost Paid 59% Medium Soln 1
1137 N-th Tribonacci Number Free 56% Easy Recursion Soln 1
1140 Stone Game II Free 65% Medium Dynamic Programming Soln 1
1143 Longest Common Subsequence Free 59% Medium Dynamic Programming Soln 1
Soln 2
1144 Decrease Elements To Make Array Zigzag Free 46% Medium Array Soln 1
1145 Binary Tree Coloring Game Free 51% Medium Tree
Depth-first Search
Soln 1
Soln 2
1146 Snapshot Array Free 37% Medium Array Soln 1
Soln 2
Soln 3
1147 Longest Chunked Palindrome Decomposition Free 59% Hard Dynamic Programming
Rolling Hash
Soln 1
Soln 2
1150 Check If a Number Is Majority Element in a Sorted Array Paid 58% Easy Soln 1
1151 Minimum Swaps to Group All 1's Together Paid 58% Medium Soln 1
1153 String Transforms Into Another String Paid 36% Hard Soln 1
1155 Number of Dice Rolls With Target Sum Free 48% Medium Dynamic Programming Soln 1
1156 Swap For Longest Repeated Character Substring Free 48% Medium String Soln 1
1157 Online Majority Element In Subarray Free 39% Hard Array
Binary Search
Segment Tree
Soln 1
1160 Find Words That Can Be Formed by Characters Free 67% Easy Array
Hash Table
Soln 1
1162 As Far from Land as Possible Free 44% Medium Breadth-first Search
Graph
Soln 1
1165 Single-Row Keyboard Paid 85% Easy Soln 1
1166 Design File System Paid 58% Medium Soln 1
1167 Minimum Cost to Connect Sticks Paid 64% Medium Soln 1
1169 Invalid Transactions Free 32% Medium Array
String
Soln 1
1170 Compare Strings by Frequency of the Smallest Character Free 59% Easy Array
String
Soln 1
1171 Remove Zero Sum Consecutive Nodes from Linked List Free 41% Medium Linked List Soln 1
1172 Dinner Plate Stacks Free 38% Hard Design Soln 1
1176 Diet Plan Performance Paid 54% Easy Soln 1
1177 Can Make Palindrome from Substring Free 36% Medium Array
String
Soln 1
1178 Number of Valid Words for Each Puzzle Free 38% Hard Hash Table
Bit Manipulation
Soln 1
1180 Count Substrings with Only One Distinct Letter Paid 77% Easy Soln 1
1182 Shortest Distance to Target Color Paid 53% Medium Soln 1
1183 Maximum Number of Ones Paid 56% Hard Soln 1
1187 Make Array Strictly Increasing Free 42% Hard Dynamic Programming Soln 1
1190 Reverse Substrings Between Each Pair of Parentheses Free 64% Medium Stack Soln 1
1192 Critical Connections in a Network Free 50% Hard Depth-first Search Soln 1
Soln 2
1196 How Many Apples Can You Put into the Basket Paid 68% Easy Soln 1
1197 Minimum Knight Moves Paid 37% Medium Soln 1
1198 Find Smallest Common Element in All Rows Paid 75% Medium Soln 1
Soln 2
Soln 3
1199 Minimum Time to Build Blocks Paid 38% Hard Soln 1
Soln 2
1200 Minimum Absolute Difference Free 67% Easy Array Soln 1
1201 Ugly Number III Free 26% Medium Math
Binary Search
Soln 1
1202 Smallest String With Swaps Free 48% Medium Array
Union Find
Soln 1
1203 Sort Items by Groups Respecting Dependencies Free 49% Hard Depth-first Search
Graph
Topological Sort
Soln 1
1207 Unique Number of Occurrences Free 72% Easy Hash Table Soln 1
1209 Remove All Adjacent Duplicates in String II Free 57% Medium Stack Soln 1
1213 Intersection of Three Sorted Arrays Paid 79% Easy Soln 1
1214 Two Sum BSTs Paid 68% Medium Soln 1
1215 Stepping Numbers Paid 43% Medium Soln 1
1217 Minimum Cost to Move Chips to The Same Position Free 71% Easy Array
Math
Greedy
Soln 1
1218 Longest Arithmetic Subsequence of Given Difference Free 46% Medium Math
Dynamic Programming
Soln 1
1219 Path with Maximum Gold Free 65% Medium Backtracking Soln 1
1220 Count Vowels Permutation Free 54% Hard Dynamic Programming Soln 1
1221 Split a String in Balanced Strings Free 84% Easy String
Greedy
Soln 1
1222 Queens That Can Attack the King Free 69% Medium Array Soln 1
1223 Dice Roll Simulation Free 47% Medium Dynamic Programming Soln 1
1224 Maximum Equal Frequency Free 34% Hard Hash Table Soln 1
1228 Missing Number In Arithmetic Progression Paid 52% Easy Soln 1
1229 Meeting Scheduler Paid 54% Medium Soln 1
1230 Toss Strange Coins Paid 49% Medium Soln 1
1232 Check If It Is a Straight Line Free 44% Easy Array
Math
Geometry
Soln 1
1233 Remove Sub-Folders from the Filesystem Free 61% Medium Array
String
Soln 1
Soln 2
1234 Replace the Substring for Balanced String Free 34% Medium Two Pointers
String
Soln 1
1236 Web Crawler Paid 64% Medium Soln 1
1238 Circular Permutation in Binary Representation Free 66% Medium Math Soln 1
1239 Maximum Length of a Concatenated String with Unique Characters Free 49% Medium Backtracking
Bit Manipulation
Soln 1
1243 Array Transformation Paid 51% Easy Soln 1
Soln 2
1244 Design A Leaderboard Paid 65% Medium Soln 1
1245 Tree Diameter Paid 61% Medium Soln 1
Soln 2
Soln 3
1246 Palindrome Removal Paid 46% Hard Soln 1
1252 Cells with Odd Values in a Matrix Free 78% Easy Array Soln 1
1254 Number of Closed Islands Free 61% Medium Depth-first Search Soln 1
1256 Encode Number Paid 67% Medium Soln 1
Soln 2
1257 Smallest Common Region Paid 60% Medium Soln 1
1258 Synonymous Sentences Paid 67% Medium Soln 1
1259 Handshakes That Don't Cross Paid 54% Hard Soln 1
Soln 2
1260 Shift 2D Grid Free 62% Easy Array Soln 1
1265 Print Immutable Linked List in Reverse Paid 95% Medium Soln 1
1271 Hexspeak Paid 55% Easy Soln 1
1272 Remove Interval Paid 58% Medium Soln 1
1273 Delete Tree Nodes Paid 63% Medium Soln 1
1275 Find Winner on a Tic Tac Toe Game Free 53% Easy Array Soln 1
1277 Count Square Submatrices with All Ones Free 73% Medium Array
Dynamic Programming
Soln 1
1287 Element Appearing More Than 25% In Sorted Array Free 60% Easy Array Soln 1
1288 Remove Covered Intervals Free 57% Medium Line Sweep Soln 1
1289 Minimum Falling Path Sum II Free 62% Hard Dynamic Programming Soln 1
1291 Sequential Digits Free 57% Medium Backtracking Soln 1
1299 Replace Elements with Greatest Element on Right Side Free 74% Easy Array Soln 1
1300 Sum of Mutated Array Closest to Target Free 43% Medium Array
Binary Search
Soln 1
1301 Number of Paths with Max Score Free 38% Hard Dynamic Programming Soln 1
1302 Deepest Leaves Sum Free 84% Medium Tree
Depth-first Search
Soln 1
1304 Find N Unique Integers Sum up to Zero Free 76% Easy Array Soln 1
1305 All Elements in Two Binary Search Trees Free 78% Medium Sort
Tree
Soln 1
1306 Jump Game III Free 63% Medium Breadth-first Search
Graph
Soln 1
1309 Decrypt String from Alphabet to Integer Mapping Free 77% Easy String Soln 1
1310 XOR Queries of a Subarray Free 69% Medium Bit Manipulation Soln 1
Soln 2
1311 Get Watched Videos by Your Friends Free 44% Medium Hash Table
String
Breadth-first Search
Soln 1
1312 Minimum Insertion Steps to Make a String Palindrome Free 59% Hard Dynamic Programming Soln 1
1313 Decompress Run-Length Encoded List Free 85% Easy Array Soln 1
1314 Matrix Block Sum Free 74% Medium Dynamic Programming Soln 1
1315 Sum of Nodes with Even-Valued Grandparent Free 84% Medium Tree
Depth-first Search
Soln 1
1316 Distinct Echo Substrings Free 49% Hard String
Rolling Hash
Soln 1
1317 Convert Integer to the Sum of Two No-Zero Integers Free 57% Easy Math Soln 1
1318 Minimum Flips to Make a OR b Equal to c Free 63% Medium Bit Manipulation Soln 1
1319 Number of Operations to Make Network Connected Free 55% Medium Depth-first Search
Breadth-first Search
Union Find
Soln 1
1320 Minimum Distance to Type a Word Using Two Fingers Free 63% Hard Dynamic Programming Soln 1
1323 Maximum 69 Number Free 78% Easy Math Soln 1
1324 Print Words Vertically Free 59% Medium String Soln 1
Soln 2
1325 Delete Leaves With a Given Value Free 73% Medium Tree Soln 1
1326 Minimum Number of Taps to Open to Water a Garden Free 46% Hard Dynamic Programming
Greedy
Soln 1
1328 Break a Palindrome Free 45% Medium String Soln 1
1329 Sort the Matrix Diagonally Free 79% Medium Array
Sort
Soln 1
1331 Rank Transform of an Array Free 58% Easy Array Soln 1
1332 Remove Palindromic Subsequences Free 63% Easy String Soln 1
1333 Filter Restaurants by Vegan-Friendly, Price and Distance Free 57% Medium Array
Sort
Soln 1
1334 Find the City With the Smallest Number of Neighbors at a Threshold Distance Free 46% Medium Graph Soln 1
1335 Minimum Difficulty of a Job Schedule Free 58% Hard Dynamic Programming Soln 1
1337 The K Weakest Rows in a Matrix Free 70% Easy Array
Binary Search
Soln 1
1342 Number of Steps to Reduce a Number to Zero Free 86% Easy Bit Manipulation Soln 1
1346 Check If N and Its Double Exist Free 37% Easy Array Soln 1
1351 Count Negative Numbers in a Sorted Matrix Free 76% Easy Array
Binary Search
Soln 1
1356 Sort Integers by The Number of 1 Bits Free 69% Easy Sort
Bit Manipulation
Soln 1
1357 Apply Discount Every n Orders Free 66% Medium Design Soln 1
1358 Number of Substrings Containing All Three Characters Free 60% Medium String Soln 1
1359 Count All Valid Pickup and Delivery Options Free 57% Hard Math
Dynamic Programming
Soln 1
Soln 2
1363 Largest Multiple of Three Free 34% Hard Math
Dynamic Programming
Soln 1
1365 How Many Numbers Are Smaller Than the Current Number Free 86% Easy Array
Hash Table
Soln 1
1366 Rank Teams by Votes Free 55% Medium Array
Sort
Soln 1
1367 Linked List in Binary Tree Free 41% Medium Linked List
Dynamic Programming
Tree
Soln 1
1368 Minimum Cost to Make at Least One Valid Path in a Grid Free 56% Hard Breadth-first Search Soln 1
1370 Increasing Decreasing String Free 76% Easy String
Sort
Soln 1
1373 Maximum Sum BST in Binary Tree Free 38% Hard Dynamic Programming
Binary Search Tree
Soln 1
1374 Generate a String With Characters That Have Odd Counts Free 76% Easy String Soln 1
1375 Bulb Switcher III Free 64% Medium Array Soln 1
1376 Time Needed to Inform All Employees Free 56% Medium Depth-first Search Soln 1
Soln 2
1377 Frog Position After T Seconds Free 34% Hard Depth-first Search Soln 1
1385 Find the Distance Value Between Two Arrays Free 67% Easy Array
1387 Sort Integers by The Power Value Free 71% Medium Sort
Graph
Soln 1
Soln 2
1391 Check if There is a Valid Path in a Grid Free 45% Medium Depth-first Search
Breadth-first Search
Soln 1
1392 Longest Happy Prefix Free 41% Hard String Soln 1
1394 Find Lucky Integer in an Array Free 63% Easy Array Soln 1
Soln 2
1395 Count Number of Teams Free 82% Medium Array Soln 1
1396 Design Underground System Free 68% Medium Design Soln 1
1399 Count Largest Group Free 65% Easy Array Soln 1
1401 Circle and Rectangle Overlapping Free 42% Medium Geometry Soln 1
1403 Minimum Subsequence in Non-Increasing Order Free 71% Easy Greedy
Sort
Soln 1
1404 Number of Steps to Reduce a Number in Binary Representation to One Free 50% Medium String
Bit Manipulation
Soln 1
1413 Minimum Value to Get Positive Step by Step Sum Free 65% Easy Array Soln 1
1414 Find the Minimum Number of Fibonacci Numbers Whose Sum Is K Free 64% Medium Array
Greedy
Soln 1
1415 The k-th Lexicographical String of All Happy Strings of Length n Free 70% Medium Backtracking Soln 1
1416 Restore The Array Free 36% Hard Dynamic Programming Soln 1
1417 Reformat The String Free 55% Easy String Soln 1
1422 Maximum Score After Splitting a String Free 56% Easy String Soln 1
1423 Maximum Points You Can Obtain from Cards Free 46% Medium Array
Dynamic Programming
Sliding Window
Soln 1
1424 Diagonal Traverse II Free 45% Medium Array
Sort
Soln 1
1425 Constrained Subsequence Sum Free 45% Hard Dynamic Programming Soln 1
1426 Counting Elements Paid 59% Easy Soln 1
1427 Perform String Shifts Paid 53% Easy Soln 1
1428 Leftmost Column with at Least a One Paid 48% Medium Soln 1
1429 First Unique Number Paid 49% Medium Soln 1
1430 Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree Paid 45% Medium Soln 1
Soln 2
1431 Kids With the Greatest Number of Candies Free 89% Easy Array Soln 1
1433 Check If a String Can Break Another String Free 67% Medium String
Greedy
Soln 1
1434 Number of Ways to Wear Different Hats to Each Other Free 39% Hard Dynamic Programming
Bit Manipulation
Soln 1
1436 Destination City Free 77% Easy String Soln 1
1437 Check If All 1's Are at Least Length K Places Away Free 62% Medium Array Soln 1
1438 Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit Free 44% Medium Array
Sliding Window
Soln 1
1439 Find the Kth Smallest Sum of a Matrix With Sorted Rows Free 60% Hard Heap Soln 1
1441 Build an Array With Stack Operations Free 69% Easy Stack Soln 1
1442 Count Triplets That Can Form Two Arrays of Equal XOR Free 71% Medium Array
Math
Bit Manipulation
Soln 1
1443 Minimum Time to Collect All Apples in a Tree Free 55% Medium Tree
Depth-first Search
Soln 1
1446 Consecutive Characters Free 61% Easy String Soln 1
1447 Simplified Fractions Free 62% Medium Math Soln 1
1448 Count Good Nodes in Binary Tree Free 70% Medium Tree
Depth-first Search
Soln 1
1449 Form Largest Integer With Digits That Add up to Target Free 43% Hard String
Dynamic Programming
Soln 1
1450 Number of Students Doing Homework at a Given Time Free 77% Easy Array Soln 1
1455 Check If a Word Occurs As a Prefix of Any Word in a Sentence Free 65% Easy String Soln 1
1456 Maximum Number of Vowels in a Substring of Given Length Free 54% Medium String
Sliding Window
Soln 1
1457 Pseudo-Palindromic Paths in a Binary Tree Free 68% Medium Bit Manipulation
Tree
Depth-first Search
Soln 1
1458 Max Dot Product of Two Subsequences Free 43% Hard Dynamic Programming Soln 1
1460 Make Two Arrays Equal by Reversing Sub-arrays Free 72% Easy Array Soln 1
1461 Check If a String Contains All Binary Codes of Size K Free 46% Medium String
Bit Manipulation
Soln 1
1462 Course Schedule IV Free 44% Medium Graph Soln 1
1463 Cherry Pickup II Free 66% Hard Dynamic Programming Soln 1
1464 Maximum Product of Two Elements in an Array Free 77% Easy Array Soln 1
1465 Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts Free 31% Medium Array Soln 1
1469 Find All The Lonely Nodes Paid 81% Easy
1470 Shuffle the Array Free 89% Easy Soln 1
Soln 2
Soln 3
1471 The k Strongest Values in an Array Free 58% Medium Soln 1
Soln 2
Soln 3
1472 Design Browser History Free 69% Medium Soln 1
1474 Delete N Nodes After M Nodes of a Linked List Paid 75% Easy Soln 1
1475 Final Prices With a Special Discount in a Shop Free 75% Easy Soln 1
1476 Subrectangle Queries Free 89% Medium Soln 1
1477 Find Two Non-overlapping Sub-arrays Each With Target Sum Free 34% Medium Soln 1
1478 Allocate Mailboxes Free 55% Hard Soln 1
1480 Running Sum of 1d Array Free 90% Easy Soln 1
1481 Least Number of Unique Integers after K Removals Free 55% Medium Soln 1
1482 Minimum Number of Days to Make m Bouquets Free 49% Medium Soln 1
1483 Kth Ancestor of a Tree Node Free 30% Hard Soln 1
1485 Clone Binary Tree With Random Pointer Paid 80% Medium Soln 1
1486 XOR Operation in an Array Free 84% Easy Soln 1
1487 Making File Names Unique Free 30% Medium Soln 1
1488 Avoid Flood in The City Free 25% Medium Soln 1
1490 Clone N-ary Tree Paid 84% Medium Soln 1
1491 Average Salary Excluding the Minimum and Maximum Salary Free 69% Easy Soln 1
1492 The kth Factor of n Free 65% Medium Soln 1
Soln 2
1493 Longest Subarray of 1's After Deleting One Element Free 59% Medium Soln 1
1494 Parallel Courses II Free 31% Hard Soln 1
1496 Path Crossing Free 56% Easy Soln 1
1497 Check If Array Pairs Are Divisible by k Free 40% Medium Soln 1
1498 Number of Subsequences That Satisfy the Given Sum Condition Free 38% Medium Soln 1
1500 Design a File Sharing System Paid 46% Medium Soln 1
1502 Can Make Arithmetic Progression From Sequence Free 71% Easy Soln 1
1503 Last Moment Before All Ants Fall Out of a Plank Free 53% Medium Soln 1
1504 Count Submatrices With All Ones Free 61% Medium Soln 1
1505 Minimum Possible Integer After at Most K Adjacent Swaps On Digits Free 36% Hard Soln 1
1506 Find Root of N-Ary Tree Paid 81% Medium Soln 1
1507 Reformat Date Free 60% Easy Soln 1
1508 Range Sum of Sorted Subarray Sums Free 63% Medium Soln 1
1509 Minimum Difference Between Largest and Smallest Value in Three Moves Free 52% Medium Soln 1
1510 Stone Game IV Free 59% Hard Soln 1
1512 Number of Good Pairs Free 88% Easy Soln 1
1513 Number of Substrings With Only 1s Free 41% Medium Soln 1
1514 Path with Maximum Probability Free 39% Medium Soln 1
1515 Best Position for a Service Centre Free 37% Hard Soln 1
1518 Water Bottles Free 61% Easy Soln 1
1519 Number of Nodes in the Sub-Tree With the Same Label Free 36% Medium Soln 1
1520 Maximum Number of Non-Overlapping Substrings Free 35% Hard Soln 1
1521 Find a Value of a Mysterious Function Closest to Target Free 44% Hard Soln 1
Soln 2
1523 Count Odd Numbers in an Interval Range Free 55% Easy Soln 1
1524 Number of Sub-arrays With Odd Sum Free 39% Medium Soln 1
1525 Number of Good Ways to Split a String Free 67% Medium Soln 1
Soln 2
1526 Minimum Number of Increments on Subarrays to Form a Target Array Free 59% Hard Soln 1
1528 Shuffle String Free 86% Easy Soln 1
1529 Bulb Switcher IV Free 71% Medium Soln 1
1530 Number of Good Leaf Nodes Pairs Free 55% Medium Soln 1
1531 String Compression II Free 33% Hard Soln 1
1533 Find the Index of the Large Integer Paid 55% Medium Soln 1
1534 Count Good Triplets Free 80% Easy Soln 1
1535 Find the Winner of an Array Game Free 47% Medium Soln 1
1536 Minimum Swaps to Arrange a Binary Grid Free 43% Medium Soln 1
1537 Get the Maximum Score Free 36% Hard Soln 1
1538 Guess the Majority in a Hidden Array Paid 61% Medium Soln 1
1539 Kth Missing Positive Number Free 53% Easy Soln 1
1540 Can Convert String in K Moves Free 30% Medium Soln 1
1541 Minimum Insertions to Balance a Parentheses String Free 42% Medium Soln 1
1542 Find Longest Awesome Substring Free 36% Hard Soln 1
1544 Make The String Great Free 55% Easy Soln 1
1545 Find Kth Bit in Nth Binary String Free 57% Medium Soln 1
1546 Maximum Number of Non-Overlapping Subarrays With Sum Equals Target Free 44% Medium Soln 1
1547 Minimum Cost to Cut a Stick Free 51% Hard Soln 1
1550 Three Consecutive Odds Free 66% Easy Soln 1
1551 Minimum Operations to Make Array Equal Free 78% Medium Soln 1
1552 Magnetic Force Between Two Balls Free 48% Medium Soln 1
1553 Minimum Number of Days to Eat N Oranges Free 29% Hard Soln 1
1556 Thousand Separator Free 59% Easy Soln 1
1557 Minimum Number of Vertices to Reach All Nodes Free 74% Medium Soln 1
1558 Minimum Numbers of Function Calls to Make Target Array Free 63% Medium Soln 1
1562 Find Latest Group of Size M Free 39% Medium Soln 1