Coding challenges from www.leetcode.com
ID | Name | Rating | Note |
---|---|---|---|
144 | Binary Tree Preorder Traversal | Alpha | |
94 | Binary Tree Inorder Traversal | Alpha | |
145 | Binary Tree Postorder Traversal | Alpha | |
429 | N-ary Tree Level Order Traversal | Alpha+ | |
589 | N-ary Tree Preorder Traversal | Alpha | |
590 | N-ary Tree Postorder Traversal | Alpha | |
100 | Same Tree | Alpha+ | |
572 | Subtree of Another Tree | Alpha+ | |
101 | Symmetric Tree | Alpha+ | |
965 | Univalued Binary Tree | Alpha+ | |
226 | Invert Binary Tree | Alpha | postorder |
112 | Path Sum | Alpha+ | |
113 | Path Sum II | Alpha+ | |
437 | Path Sum III | Alpha+ | preorder |
124 | Binary Tree Maximum Path Sum | Alpha+ | postorder |
543 | Diameter of Binary Tree | Alpha+ | postorder |
N14 | Diameter of Generic Tree | Alpha | I.Q. |
687 | Longest Univalue Path | Alpha+ | postorder |
250 | Count Univalue Subtrees | Alpha+ | postorder |
104 | Maximum Depth of Binary Tree | Alpha+ | postorder |
366 | Find Leaves of Binary Tree | Alpha+ | postorder |
111 | Minimum Depth of Binary Tree | Alpha+ | postorder, BFS |
257 | Binary Tree Paths | Alpha+ | |
129 | Sum Root to Leaf Numbers | Alpha+ | |
298 | Binary Tree Longest Consecutive Sequence | Alpha+ | |
549 | Binary Tree Longest Consecutive Sequence II | Alpha+ | |
110 | Balanced Binary Tree | Alpha+ | |
102 | Binary Tree Level Order Traversal | Alpha+ | postorder, BFS |
107 | Binary Tree Level Order Traversal II | Alpha | postorder, BFS |
314 | Binary Tree Vertical Order Traversal | Alpha+ | BFS |
103 | Binary Tree Zigzag Level Order Traversal | Alpha | BFS |
199 | Binary Tree Right Side View | Alpha+ | preorder |
114 | Flatten Binary Tree to Linked List | Alpha+ | preorder |
222 | Count Complete Tree Nodes | Alpha+ | |
105 | Construct Binary Tree from Preorder and Inorder Traversal | Alpha+ | preorder |
106 | Construct Binary Tree from Inorder and Postorder Traversal | Alpha+ | postorder |
331 | Verify Preorder Serialization of a Binary Tree | Charlie | |
116 | Populating Next Right Pointers in Each Node | Alpha | BFS, preorder |
117 | Populating Next Right Pointers in Each Node II | Alpha | BFS, preorder |
297 | Serialize and Deserialize Binary Tree | Alpha+ | preorder |
428 | Serialize and Deserialize N-ary Tree | Alpha+ | preorder |
449 | Serialize and Deserialize Binary Search Tree | Alpha | |
236 | Lowest Common Ancestor of a Binary Tree | Alpha+ | mechanical, postorder |
1676 | Lowest Common Ancestor of a Binary Tree IV | Alpha+ | postorder |
1644 | Lowest Common Ancestor of a Binary Tree II | Alpha+ | postorder |
1650 | Lowest Common Ancestor of a Binary Tree III | Alpha+ | |
235 | Lowest Common Ancestor of a Binary Search Tree | Alpha+ | |
341 | Flatten Nested List Iterator | Bravo | |
339 | Nested List Weight Sum | Alpha+ | preorder |
364 | Nested List Weight Sum II | Alpha+ | preorder |
987 | Vertical Order Traversal of a Binary Tree | Alpha+ | |
1302 | Deepest Leaves Sum | Alpha+ | |
872 | Leaf-Similar Trees | Alpha+ | |
814 | Binary Tree Pruning | Alpha+ | postorder |
1325 | Delete Leaves With a Given Value | Alpha+ | postorder |
508 | Most Frequent Subtree Sum | Alpha+ | postorder |
1973 | Count Nodes Equal to Sum of Descendants | Alpha+ | postorder |
1120 | Maximum Average Subtree | Alpha+ | postorder |
968 | Binary Tree Cameras | Alpha | postorder |
337 | House Robber III | Alpha+ | postorder |
979 | Distribute Coins in Binary Tree | Bravo | postorder |
ID | Name | Rating | Note |
---|---|---|---|
98 | Validate Binary Search Tree | Alpha+ | preorder, inorder, postorder |
530 | Minimum Absolute Difference in BST | Alpha+ | inorder |
700 | Search in a Binary Search Tree | Alpha+ | preorder |
701 | Insert into a Binary Search Tree | Alpha+ | preorder |
450 | Delete Node in a BST | Alpha+ | preorder |
333 | Largest BST Subtree | Alpha+ | preorder |
99 | Recover Binary Search Tree | Alpha | Inorder |
108 | Convert Sorted Array to Binary Search Tree | Alpha+ | |
109 | Convert Sorted List to Binary Search Tree | Alpha+ | |
173 | Binary Search Tree Iterator | Bravo | mechanical |
230 | Kth Smallest Element in a BST | Alpha+ | |
285 | Inorder Successor in BST | Alpha+ | |
270 | Closest Binary Search Tree Value | Alpha+ | |
272 | Closest Binary Search Tree Value II | Alpha+ | |
255 | Verify Preorder Sequence in Binary Search Tree | Hard | |
96 | Unique Binary Search Trees | Bravo | |
95 | Unique Binary Search Trees II | Bravo | |
501 | Find Mode in Binary Search Tree | Bravo | |
669 | Trim a Binary Search Tree | Alpha+ |
ID | Name | Rating | Note |
---|---|---|---|
141 | Linked List Cycle | Alpha+ | |
142 | Linked List Cycle II | Alpha | |
876 | Middle of the Linked List | Alpha+ | |
234 | Palindrome Linked List | Alpha+ | |
24 | Swap Nodes in Pairs | Alpha+ | |
237 | Delete Node in a Linked List | Alpha+ | |
19 | Remove Nth Node From End of List | Alpha+ | |
1474 | Delete N Nodes After M Nodes of a Linked List | Alpha | |
203 | Remove Linked List Elements | Alpha+ | |
1836 | Remove Duplicates From an Unsorted Linked List | Alpha+ | |
83 | Remove Duplicates from Sorted List | Alpha+ | |
82 | Remove Duplicates from Sorted List II | Bravo | |
2 | Add Two Numbers | Alpha+ | |
445 | Add Two Numbers II | Alpha+ | |
369 | Plus One Linked List | Alpha+ | |
160 | Intersection of Two Linked Lists | Alpha+ | |
21 | Merge Two Sorted Lists | Alpha+ | |
143 | Reorder List | Alpha | |
147 | Insertion Sort List | Alpha | insertion sort |
148 | Sort List | Alpha+ | merge sort |
61 | Rotate List | Alpha+ | |
86 | Partition List | Alpha+ | |
23 | Merge k Sorted Lists | Alpha+ | |
206 | Reverse Linked List | Alpha+ | |
92 | Reverse Linked List II | Alpha | |
25 | Reverse Nodes in k-Group | Alpha | |
707 | Designed Linked List | Bravo | |
1290 | Convert Binary Number in a Linked List to Integer | Alpha |
ID | Name | Rating | Note |
---|---|---|---|
N1 | Minimum Distance Between Two Points in a Matrix | Alpha+ | BFS |
N2 | Shortest Path Between Two Points in a Matrix | Alpha+ | BFS |
N3 | Unique Paths from Top Left to Bottom Right | Alpha+ | BFS |
127 | Word Ladder | Alpha+ | BFS |
126 | Word Ladder II | Hard, BFS | |
752 | Open the Lock | Alpha+ | BFS |
542 | 01 Matrix | Alpha+ | BFS |
286 | Walls and Gates | Alpha+ | BFS |
934 | Shortest Bridge | Alpha+ | BFS |
433 | Minimum Genetic Mutation | Alpha+ | BFS |
815 | Bus Routes | Alpha+ | BFS |
111 | Minimum Depth of Binary Tree | Alpha+ | postorder, BFS |
773 | Sliding Puzzle | Alpha+ | |
863 | All Nodes Distance K in Binary Tree | Alpha+ | BFS |
1129 | Shortest Path with Alternating Colors | Alpha+ | BFS, mechanical |
847 | Shortest Path Visiting All Nodes | Alpha | multidimensional BFS |
864 | Shortest Path to Get All Keys | Alpha+ | multidimensional BFS |
207 | Course Schedule | Alpha+ | topological sort |
N15 | Construct Dependency Graph | Alpha+ | I.Q., graph traversal, postorder |
210 | Course Schedule II | Alpha+ | topological sort, postorder |
802 | Find Eventual Safe States | Alpha+ | topological sort |
785 | Is Graph Bipartite | Alpha+ | bipartition, coloring |
886 | Possible Bipartition | Alpha+ | bipartition, coloring |
1042 | Flower Planting With No Adjacent | Alpha+ | coloring, greedy |
133 | Clone Graph | Alpha+ | clone |
1490 | Clone N-ary Tree | Alpha | clone |
138 | Copy List with Random Pointer | Alpha | clone |
1485 | Clone Binary Tree With Random Pointer | Alpha | clone |
797 | All Paths From Source to Target | Alpha+ | graph traversal |
399 | Evaluate Division | Alpha+ | graph traversal |
N5 | Union Find | Alpha+ | union find |
990 | Satisfiability of Equality Equations | Alpha+ | union find |
261 | Graph Valid Tree | Alpha+ | union find |
305 | Number of Islands II | Alpha+ | union find |
323 | Number of Connected Components in an Undirected Graph | Alpha+ | union find |
547 | Number of Provinces | Alpha+ | union find |
684 | Redundant Connection | Alpha+ | union find |
721 | Accounts Merge | Bravo | union find |
200 | Number of Islands | Alpha+ | DFS, union find |
733 | Flood Fill | Alpha+ | DFS |
1905 | Count Sub Islands | Alpha+ | DFS |
695 | Max Area of Island | Alpha+ | DFS, union find |
694 | Number of Distinct Islands | Alpha+ | DFS |
463 | Island Perimeter | Alpha | |
827 | Making a Large Island | Alpha+ | DFS, union find |
1162 | As Far from Land as Possible | Alpha+ | BFS |
130 | Surrounded Regions | Alpha | |
841 | Keys and Rooms | Alpha+ | DFS |
1202 | Smallest String With Swaps | Alpha | union find |
839 | Similar String Groups | Alpha | union find |
952 | Largest Component Size by Common Factor | Alpha+ | union find |
737 | Sentence Similarity II | Alpha+ | union find |
1319 | Number of Operations to Make Network Connected | Alpha+ | union find |
959 | Regions Cut By Slashes | Alpha+ | union find |
997 | Find the Town Judge | Alpha+ | |
N6 | Dijkstra | Alpha+ | Dijkstra |
743 | Network Delay Time | Alpha+ | Dijkstra |
787 | Cheapest Flights Within K Stops | Alpha+ | Dijkstra |
1631 | Path With Minimum Effort | Alpha | Dijkstra |
1514 | Path with Maximum Probability | Alpha | Dijkstra |
1334 | Find the City With the Smallest Number of Neighbors at a Threshold Distance | Alpha | Dijkstra |
332 | Reconstruct Itinerary | Charlie | |
79 | Word Search | Alpha+ | |
212 | Word Search II | Alpha | Trie, DFS |
329 | Longest Increasing Path in a Matrix | Alpha+ | DFS |
489 | Robot Room Cleaner | Alpha+ | |
N11 | Shortest Path Given Robot API | Alpha+ |
ID | Name | Rating | Note |
---|---|---|---|
239 | Sliding Window Maximum | Alpha+ | sliding window, monotonic queue |
209 | Minimum Size Subarray Sum | Alpha+ | |
567 | Permutation in String | Alpha+ | |
438 | Find All Anagrams in a String | Alpha+ | |
76 | Minimum Window Substring | Alpha+ | |
1438 | Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit | Alpha+ | |
217 | Contains Duplicate | Alpha+ | |
219 | Contains Duplicate II | Alpha+ | |
220 | Contains Duplicate III | Alpha+ | |
3 | Longest Substring Without Repeating Characters | Alpha+ | |
1695 | Maximum Erasure Value | Alpha+ | |
159 | Longest Substring with At Most Two Distinct Characters | Alpha+ | |
340 | Longest Substring with At Most K Distinct Characters | Alpha+ | |
424 | Longest Repeating Character Replacement | Alpha | |
395 | Longest Substring with At Least K Repeating Characters | Alpha+ | |
2067 | Number of Equal Count Substrings | Alpha | |
992 | Subarrays with K Different Integers | Alpha+ | |
1004 | Max Consecutive Ones III | Alpha+ | |
487 | Max Consecutive Ones II | Alpha+ | |
1052 | Grumpy Bookstore Ownder | Alpha | |
1100 | Find K-Length Substrings With No Repeated Characters | Alpha+ | |
1151 | Minimum Swaps to Group All 1's Together | Alpha+ | |
1208 | Get Equal Substrings Within Budget | Alpha+ | |
1423 | Maximum Points You Can Obtain from Cards | Alpha+ | |
1176 | Diet Plan Performance | Alpha | |
1456 | Maximum Number of Vowels in a Substring of Given Length | Alpha+ | |
1658 | Minimum Operations to Reduce X to Zero | Alpha+ |
ID | Name | Rating | Note |
---|---|---|---|
35 | Search Insert Position | Alpha+ | |
704 | Binary Search | Alpha+ | |
1150 | Check If a Number Is Majority Element in a Sorted Array | Alpha+ | |
475 | Heaters | Alpha | |
441 | Arranging Coins | Alpha+ | |
367 | Valid Perfect Square | Alpha+ | |
69 | Sqrt(x) | Alpha+ | |
611 | Valid Triangle Number | Alpha+ | |
33 | Search in Rotated Sorted Array | Alpha+ | |
81 | Search in Rotated Sorted Array II | Alpha+ | |
153 | Find Minimum in Rotated Sorted Array | Alpha+ | Devide and Conquer |
154 | Find Minimum in Rotated Sorted Array II | Alpha+ | |
34 | Find First and Last Position of Element in Sorted Array | Alpha+ | |
315 | Count of Smaller Numbers After Self | Alpha+ | |
378 | Kth Smallest Element in a Sorted Matrix | Alpha+ | binary search, priority queue |
668 | Kth Smallest Number in Multiplication Table | Alpha | |
719 | Find K-th Smallest Pair Distance | Alpha | |
74 | Search a 2D Matrix | Alpha+ | |
240 | Search a 2D Matrix II | Alpha, Mechanical | |
287 | Find the Duplicate Number | Bravo | |
162 | Find Peak Element | Bravo | |
852 | Peack Index in a Mountain Array | Alpha+ | |
1095 | Find in Mountain Array | Alpha | |
4 | Median of Two Sorted Arrays | Alpha | mechanical |
274 | H-Index | Alpha | See 275 |
275 | H-Index II | Alpha | |
278 | First Bad Version | Alpha+ | |
875 | Koko Eating Bananas | Alpha+ | koko-eat-bananas |
1011 | Capacity To Ship Packages Within D Days | Alpha+ | koko-eat-bananas |
1891 | Cutting Ribbons | Alpha+ | koko-eat-bananas |
981 | Time Based Key-Value Store | Alpha+ | |
215 | Kth Largest Element in an Array | Alpha | quick sort, binary search |
ID | Name | Rating | Note |
---|---|---|---|
455 | Assign Cookies | Alpha | two pointers |
125 | Valid Palindrome | Alpha+ | two pointers |
917 | Reverse Only Letters | Alpha+ | two pointers |
42 | Trapping Rain Water | Alpha+ | dynamic programming, two pointers, monotonic stack |
11 | Container With Most Water | Alpha+ | two pointers |
1498 | Number of Subsequences That Satisfy the Given Sum Condition | Bravo | two pointers |
925 | Long Pressed Name | Bravo | |
986 | Interval List Intersection | Alpha+ | two pointers, intervals |
881 | Boats to Save People | Alpha+ | |
977 | Squares of a Sorted Array | Alpha+ |
ID | Name | Rating | Note |
---|---|---|---|
46 | Permutations | Alpha+ | |
47 | Permutations II | Alpha+ | |
996 | Number of Squareful Arrays | Alpha+ | |
77 | Combinations | Alpha+ | |
78 | Subsets | Alpha+ | |
491 | Increasing Subsequence | Alpha+ | |
39 | Combination Sum | Alpha+ | |
40 | Combination Sum II | Alpha+ | |
90 | Subsets II | Alpha+ | |
216 | Combination Sum III | Alpha+ | |
377 | Combination Sum IV | Charlie | |
254 | Factor Combinations | Alpha+ | |
17 | Letter Combinations of a Phone Number | Alpha+ | |
51 | N-Queens | Alpha+ | |
52 | N-Queens II | Alpha+ | See 51 N-Queens |
37 | Sudoku Solver | Alpha+ | |
22 | Generate Parentheses | Alpha+ | |
241 | Different Ways to Add Parentheses | Alpha+ | |
139 | Word Break | Alpha+ | DFS, dynamic programming |
140 | Word Break II | Alpha | |
267 | Palindrome Permutation II | Alpha+ | |
784 | Letter Case Permutation | Alpha+ | DFS |
698 | Partition to K Equal Sum Subsets | Alpha+ | |
93 | Restore IP Addresses | Alpha+ | |
842 | Split Array into Fibonacci Sequence | Alpha+ | |
131 | Palindrome Partitioning | Alpha+ | |
282 | Expression Add Operators | Alpha |
ID | Name | Rating | Note |
---|---|---|---|
1 | Two Sum | Alpha+ | |
170 | Two Sum III - Data structure design | Alpha+ | |
653 | Two Sum IV - Input is a BST | Alpha | |
167 | Two Sum II - Input array is sorted | Alpha+ | Two pointers |
1099 | Two Sum Less Than K | Alpha+ | Two pointers |
18 | 4Sum | Alpha+ | Two pointers |
15 | 3Sum | Alpha | Two pointers |
16 | 3Sum Closest | Alpha | Two pointers |
259 | 3Sum Smaller | Alpha | Two pointers |
454 | 4Sum II | Alpha+ | hash table |
ID | Name | Rating | Note |
---|---|---|---|
20 | Valid Parentheses | Alpha | |
32 | Longest Valid Parentheses | Charlie | |
22 | Generate Parentheses | Alpha+ | |
301 | Remove Invalid Parentheses | Alpha+ | |
241 | Different Ways to Add Parentheses | Alpha+ | |
856 | Score of Parentheses | Exotic | |
921 | Minimum Add to Make Parentheses Valid | Bravo | |
1249 | Minimum Remove to Make Valid Parentheses | Alpha | |
1190 | Reverse Substrings Between Each Pair of Parentheses | Bravo, Mechanical |
ID | Name | Rating | Note |
---|---|---|---|
325 | Maximum Size Subarray Sum Equals k | Alpha+ | prefix sum |
525 | Contiguous Array | Alpha+ | |
862 | Shortest Subarray with Sum at Least K | Hard | running sum, mechanical |
560 | Subarray Sum Equals K | Alpha+ | prefix sum, hash map |
930 | Binary Subarrays With Sum | Alpha | prefix sum, hash map |
1074 | Number of Submatriecs That Sum To Target | TODO | |
N16 | Find Minimum Length of Two Non-Overlapping Subarrays Each with a Sum Equal to Target | I.Q. |
ID | Name | Rating | Note |
---|---|---|---|
155 | Min Stack | Alpha+ | |
232 | Implement Queue using Stacks | Bravo | |
225 | Implement Stack using Queues | Bravo | |
150 | Evaluate Reverse Polish Notation | Alpha+ | |
42 | Trapping Rain Water | Alpha+ | dynamic programming, two pointers, monotonic stack |
84 | Largest Rectangle in Histogram | Alpha+ | monotonic stack |
503 | Next Greater Element II | Alpha+ | monotonic stack |
739 | Daily Temperatures | Alpha+ | monotonic stack |
496 | Next Greater Element I | Alpha | monotonic stack |
239 | Sliding Window Maximum | Alpha+ | sliding window, monotonic queue |
901 | Online Stock Span | Alpha | monotonic stack |
347 | Top K Frequent Elements | Alpha+ | |
692 | Top K Frequent Words | Alpha+ | |
451 | Sort Characters By Frequency | Alpha | |
295 | Find Median from Data Stream | Alpha+ | |
480 | Sliding Window Median | Alpha+ | |
373 | Find K Pairs with Smallest Sums | Alpha+ | |
218 | The Skyline Problem | Bravo | |
973 | K CLosest Points to Origin | Alpha+ | priority queue, custom sort |
ID | Name | Rating | Note |
---|---|---|---|
359 | Logger Rate Limiter | Alpha+ | |
346 | Moving Average from Data Stream | Alpha+ | |
362 | Design Hit Counter | Alpha+ | |
281 | Zigzag Iterator | Alpha | |
251 | Flatten 2D Vector | Alpha | |
348 | Design Tic-Tac-Toe | Bravo | |
146 | LRU Cache | Alpha+ | |
460 | LFU Cache | Alpha | |
303 | Range Sum Query - Immutable | Alpha | |
304 | Range Sum Query 2D - Immutable | Alpha | |
N7 | Timedelta Statistics | Alpha | |
N8 | Endpoint Metrics | Alpha | I.Q. |
N10 | Dictionary Supports getRandom | Alpha | I.Q. |
ID | Name | Rating | Note |
---|---|---|---|
208 | Implement Trie (Prefix Tree) | Alpha+ | |
212 | Word Search II | Alpha+ | |
648 | Replace Words | Bravo | |
677 | Map Sum Pairs | Alpha | |
211 | Design Add and Search Words Data Structure | Alpha |
ID | Name | Rating | Note |
---|---|---|---|
27 | Remove Element | Alpha+ | |
283 | Move Zeroes | Alpha+ | |
26 | Remove Duplicates from Sorted Array | Alpha+ | |
80 | Remove Duplicates from Sorted Array II | Alpha+ | |
277 | Find the Celebrity | Bravo | |
189 | Rotate Array | Alpha+ | |
299 | Bulls and Cows | Bravo | |
134 | Gas Station | Bravo | |
118 | Pascal's Triangle | Alpha | |
119 | Pascal's Triangle II | Charlie | Duplicate with 118 |
169 | Majority Element | Alpha+ | |
229 | Majority Element II | Bravo | |
243 | Shortest Word Distance | Alpha+ | |
245 | Shortest Word Distance III | Alpha | |
244 | Shortest Word Distance II | Alpha | |
55 | Jump Game | Alpha | |
45 | Jump Game II | Alpha | |
128 | Longest Consecutive Sequence | Alpha+ | |
674 | Longest Continuous Increasing Subsequence | Alpha+ | dynamic programming |
673 | Number of Increasing Subsequence | Bravo | dynamic programming |
164 | Maximum Gap Bucket | Hard | |
135 | Candy | Alpha | |
330 | Patching Array | Hard | |
321 | Create Maximum Number | Hard | |
56 | Merge Intervals | Alpha+ | intervals |
57 | Insert Intervals | Alpha+ | intervals |
252 | Meeting Rooms | Alpha+ | |
253 | Meeting Rooms II | Alpha+ | |
435 | Non-overlapping Intervals | Alpha+ | greedy |
452 | Minimum Number of Arrows to Burst Balloons | Alpha | greedy |
1640 | Check Array Formation Through Concatenation | Bravo | |
238 | Product of Array Except Self | Alpha | |
228 | Summary Ranges | Exotic | |
163 | Missing Ranges | Exotic | |
88 | Merge Sorted Array | Alpha | |
75 | Sort Colors | Bravo | Two pointers, mechanical |
41 | First Missing Positive | Alpha | Two pointers |
280 | Wiggle Sort | Charlie | |
324 | Wiggle Sort II | Charlie | |
370 | Range Addition | Charlie | |
349 | Intersection of Two Arrays | Alpha | |
350 | Intersection of Two Arrays II | Alpha+ | |
N17 | Find the First, Second and Third Minimum Elements in an Array | Alpha+ | |
334 | Increasing Triplet Subsequence | Alpha | dynamic programming |
414 | Third Maximum Number | Alpha+ | |
406 | Queue Reconstruction by Height | Bravo, Mechanical | |
363 | Max Sum of Rectangle No Larger Than K | Bravo | Mechanical |
485 | Max Consecutive Ones | Alpha+ | |
849 | Maximize Distance to Closest Person | Bravo | |
855 | Exam Room | Bravo | |
645 | Set Mismatch | Alpha+ | |
912 | Sort an Array | Bravo | |
1395 | Count Number of Teams | Alpha |
ID | Name | Rating | Note |
---|---|---|---|
28 | Implement strStr() | Bravo | |
14 | Longest Common Prefix | Alpha+ | |
58 | Length of Last Word | Alpha | |
344 | Reverse String | Alpha+ | |
186 | Reverse Words in a String II | Alpha+ | |
151 | Reverse Words in a String | Alpha+ | |
345 | Reverse Vowels of a String | Alpha+ | |
434 | Number of Segments in a String | Alpha+ | |
205 | Isomorphic Strings | Alpha+ | |
290 | Word Pattern | Alpha | |
293 | Flip Game | Alpha | |
294 | Flip Game II | Alpha | Recursion |
387 | First Unique Character in a String | Alpha | |
383 | Ransom Note | Alpha | |
242 | Valid Anagram | Alpha+ | |
49 | Group Anagrams | Alpha+ | |
249 | Group Shifted Strings | Alpha+ | |
179 | Largest Number | Alpha | custom sort |
6 | ZigZag Conversion | Alpha | |
161 | One Edit Distance | Alpha+ | |
38 | Count and Say | Exotic | |
271 | Encode and Decode Strings | Alpha+ | |
168 | Excel Sheet Column Title | Exotic | |
171 | Excel Sheet Column Number | Charlie | |
13 | Roman to Integer | Bad | |
12 | Integer to Roman | Bad | |
246 | Strobogrammatic Number | Alpha | |
247 | Strobogrammatic Number II | Charlie | |
125 | Valid Palindrome | Alpha+ | two pointers |
680 | Valid Palindrome II | Alpha+ | |
266 | Palindrome Permutation | Alpha | |
267 | Palindrome Permutation II | Alpha+ | |
392 | Is Subsequence | Alpha+ | |
792 | Number of Matching Subsequence | Alpha+ | |
187 | Repeated DNA Sequences | Alpha+ | |
771 | Jewels and Stongs | Alpha | |
844 | Backspace String Compare | Alpha | |
1967 | Number of Strings That Appear as Substrings in Word | Alpha+ | |
372 | Super Pos | Exotic |
ID | Name | Rating | Note |
---|---|---|---|
48 | Rotate Image | Alpha+ | |
54 | Spiral Matrix | Alpha+ | |
59 | Spiral Matrix II | Alpha+ | |
73 | Set Matrix Zeroes | Alpha | |
311 | Sparse Matrix Multiplication | Alpha+ | |
36 | Valid Sudoku | Alpha |
ID | Name | Rating | Note |
---|---|---|---|
7 | Reverse Integer | Alpha+ | |
9 | Palindrome Number | Alpha+ | |
66 | Plus One | Alpha | |
369 | Plus One Linked List | Alpha+ | |
258 | Add Digits | Alpha | |
2 | Add Two Numbers | Alpha+ | |
415 | Add Strings | Alpha+ | |
67 | Add Binary | Alpha+ | |
43 | Multiply Strings | Exotic | |
204 | Count Primes | Alpha+ | |
231 | Power of Two | Alpha+ | |
326 | Power of Three | Alpha | |
342 | Power of Four | Alpha | |
319 | Bulb Switcher | Bravo | |
292 | Nim Game | Exotic | |
202 | Happy Number | Alpha+ | |
263 | Ugly Number | Alpha+ | |
264 | Ugly Number II | Exotic | |
313 | Super Ugly Number | Exotic | |
31 | Next Permutation | Bravo, Mechanical | |
60 | Permutation Sequence | Exotic | |
224 | Basic Calculator | Alpha | See 772 |
227 | Basic Calculator II | Alpha | See 772 |
772 | Basic Calculator III | Alpha+ | |
50 | Pow(x, n) | Alpha | |
223 | Rectangle Area | Bravo | Geometry |
1447 | Simplified Fractions | Bravo | GCD |
ID | Name | Rating | Note |
---|---|---|---|
1188 | Design Bounded Blocking Queue | Alpha+ | |
1114 | Print in Order.cpp | Alpha+ | |
1115 | Print FooBar Alternately.cpp | Alpha+ | |
1116 | Print Zero Even Odd.cpp | Alpha | |
1195 | Fizz Buzz Multithreaded.cpp | Alpha+ |
ID | Name | Rating | Note |
---|---|---|---|
N9 | Function Pointers | Alpha | |
N13 | Polymorphism | Alpha |
ID | Name | Rating | Note |
---|---|---|---|
N12 | Half Space | Alpha+ |
ID | Name | Rating | Note |
---|---|---|---|
991 | Broken Calculator | Charlie | math |
556 | Next Greater Element III | Charlie | |
969 | Pancake Sorting | Charlie | recursion |
1578 | Minimum Deletion Cost to Avoid Repeating Letters | Alpha | |
995 | Minimum Number of K Consecutive Bit Flips | Bravo | greedy |
795 | Number of Subarrays with Bounded Maximum | Bravo |
ID | Name | Rating | Note |
---|---|---|---|
289 | Game of Life | Alpha | |
136 | Single Number | Alpha | |
389 | Find the Difference | Alpha | |
137 | Single Number II | Bravo, Mechanical | |
260 | Single Number III | Bravo, Mechanical | |
268 | Missing Number | Bravo | |
191 | Number of 1 Bits | Alpha+ | |
190 | Reverse Bits | Alpha | |
201 | Bitwise AND of Numbers Range | Bravo |
ID | Name | Rating | Note |
---|---|---|---|
121 | Best Time to Buy and Sell Stock | Alpha+ | |
122 | Best Time to Buy and Sell Stock II | Alpha+ | |
123 | Best Time to Buy and Sell Stock III | Alpha+ | |
188 | Best Time to Buy and Sell Stock IV | Alpha+ | |
309 | Best Time to Buy and Sell Stock with Cooldown | Alpha+ | |
714 | Best Time to Buy and Sell Stock with Transaction Fee | Alpha+ | |
70 | Climbing Stairs | Alpha+ | |
746 | Min Cost Climbing Staris | Alpha | |
120 | Triangle | Alpha | |
279 | Perfect Squares | Alpha | |
322 | Coin Change | Alpha+ | |
256 | Paint House | Alpha+ | |
265 | Paint House II | Alpha+ | |
198 | House Robber | Alpha+ | |
213 | House Robber II | Alpha | |
337 | House Robber III | Alpha+ | postorder |
740 | Delete and Earn | Alpha | |
62 | Unique Paths | Alpha+ | |
N3 | Unique Paths from Top Left to Bottom Right | Alpha+ | |
63 | Unique Paths II | Alpha+ | |
64 | Minimum Path Sum | Alpha+ | |
221 | Maximal Square | Alpha | |
361 | Bomb Enemy | Alpha+ | |
53 | Maximum Subarray | Alpha+ | |
152 | Maximum Product Subarray | Alpha+ | |
376 | Wiggle Subsequence | Alpha+ | |
978 | Longest Turbulent Subarray | Alpha | |
97 | Interleaving String | Alpha | 2D DP String |
44 | Wildcard Matching | Bravo | 2D DP String, Mechanical |
115 | Distinct Subsequences | Bravo | 2D DP String |
139 | Word Break | Alpha+ | 1D DP String |
673 | Number of Increasing Subsequence | Bravo | |
300 | Longest Increasing Subsequence | Alpha+ | |
354 | Russian Doll Envelopes | Alpha+ | |
1143 | Longest Common Subsequence | Alpha+ | |
583 | Delete Operation for Two Strings | Alpha+ | |
72 | Edit Distance | Alpha | |
516 | Longest Palindromic Subsequence | Alpha+ | |
5 | Longest Palindromic Substring | Alpha+ | |
1312 | Minimum Insertion Steps to Make a String Palindrome | Alpha+ | |
10 | Reguar Expression Matching | Alpha | |
651 | 4 Keys Keyboard | Alpha | |
650 | 2 Keys Keyboard | Alpha | |
887 | Super Egg Drop | Bravo | dynamic programming, binary search |
312 | Burst Balloons | Bravo | |
N4 | 1-0 Knapsack | Alpha | knapsack |
416 | Partition Equal Subset Sum | Alpha | knapsack |
518 | Coin Change 2 | Alpha | knapsack |
494 | Target Sum | Alpha+ | backtracking, dynamic programming, knapsack |
1048 | Longest String Chain | Alpha+ | |
1027 | Longest Arithmetic Subsequence | Alpha+ | |
727 | Minimum Window Subsequence | Bravo |