Skip to content

Latest commit

 

History

History
689 lines (676 loc) · 311 KB

README.md

File metadata and controls

689 lines (676 loc) · 311 KB

Algorithms

ID Blog Solutions Diffculty Tags
48 Rotate Image 1
.py
MEDIUM MATH
1299 Replace Elements with Greatest Element on Right Side 1
.cpp
EASY ARRAY
1360 Number of Days Between Two Dates 1
.cpp
EASY DATE
1213 Intersection of Three Sorted Arrays 2
.py
.cpp
199 Binary Tree Right Side View 1
.py
MEDIUM DFS
151 Reverse Words in a String 1
.cpp
MEDIUM STRING
2521 Distinct Prime Factors of Product of Array 2
.py
.rs
MEDIUM MATH
1491 Average Salary Excluding the Minimum and Maximum Salary 2
.py
.cpp
EASY MATH
96 Unique Binary Search Trees 1
.py
MEDIUM MATH
DP
452 Minimum Number of Arrows to Burst Balloons 1
.py
MEDIUM GREEDY
359 Logger Rate Limiter 2
.cpp
.java
593 Valid Square 2
.cpp
.java
307 Range Sum Query - Mutable 1
.py
MEDIUM MATH
SQRT DECOMPOSITION
762 Prime Number of Set Bits in Binary Representation 2
.py
.cpp
557 Reverse Words in a String III 3
.cpp
.java
1523 Count Odd Numbers in an Interval Range 1
.py
EASY MATH
11 Container With Most Water 1
.py
MEDIUM MATH
TWO POINTER
2716 Minimize String Length 1
.py
EASY HASH MAP
1134 Armstrong Number 1
.py
1903 Largest Odd Number in String 1
.py
EASY GREEDY
STRING
1218 Longest Arithmetic Subsequence of Given Difference 1
.cpp
1325 Delete Leaves With a Given Value 1
.java
MEDIUM RECURSION
BINARY TREE
DFS
110 Balanced Binary Tree 1
.cpp
EASY RECURSION
BINARY TREE
647 Palindromic Substrings 2
.cpp
2506 Count Pairs Of Similar Strings 1
.rs
EASY MATH
HASH MAP
1492 The kth Factor of n 1
.cpp
MEDIUM
1304 Find N Unique Integers Sum up to Zero 1
.py
EASY MATH
2409 Count Days Spent Together 1
.py
MEDIUM LINE SWEEP
443 String Compression 1
.cpp
357 Count Numbers with Unique Digits 1
.py
MEDIUM DP
1812 Determine Color of a Chessboard Square 1
.cpp
EASY MATH
559 Maximum Depth of N-ary Tree 1
.py
EASY BFS
350 Intersection of Two Arrays II 4
.cpp
.js
.java
1832 Check if the Sentence Is Pangram 1
.py
EASY STRING
HASH MAP
986 Interval List Intersections 1
.cpp
MEDIUM TWO POINTER
120 Triangle 1
.py
MEDIUM DP
1046 Last Stone Weight 1
.java
EASY PRIORITY QUEUE
1215 Stepping Numbers 1
.cpp
1275 Find Winner on a Tic Tac Toe Game 1
.cpp
EASY BRUTEFORCE
GAME
1930 Unique Length-3 Palindromic Subsequences 1
.py
MEDIUM HASH MAP
1658 Minimum Operations to Reduce X to Zero 1
.py
MEDIUM TWO POINTER
SLIDING WINDOW
576 Out of Boundary Paths 1
.py
MEDIUM RECURSION
DP
MEMOIZATION
1099 Two Sum Less Than K 2
.cpp
448 Find All Numbers Disappeared in an Array 1
.py
EASY HASH MAP
73 Set Matrix Zeroes 1
.py
MEDIUM HASH MAP
108 Convert Sorted Array to Binary Search Tree 2
.cpp
EASY RECURSION
BINARY TREE
500 Keyboard Row 1
.py
EASY HASH MAP
1710 Maximum Units on a Truck 1
.cpp
EASY GREEDY
758 Bold Words in String 1
.cpp
654 Maximum Binary Tree 2
.cpp
1342 Number of Steps to Reduce a Number to Zero 2
.py
.cpp
EASY MATH
1253 Reconstruct a 2-Row Binary Matrix 1
.cpp
MEDIUM GREEDY
961 N-Repeated Element in Size 2N Array 12
.js
.java
.cpp
.py
.php
1558 Minimum Numbers of Function Calls to Make Target Array 1
.cpp
MEDIUM MATH
504 Base 7 3
.cpp
171 Excel Sheet Column Number 1
.py
EASY
1470 Shuffle the Array 1
.go
EASY ARRAY
1110 Delete Nodes And Return Forest 1
.cpp
1085 Sum of Digits in the Minimum Number 4
.py
.cpp
2605 Form Smallest Number From Two Digit Arrays 1
.py
EASY SET
1886 Determine Whether Matrix Can Be Obtained By Rotation 1
.py
EASY MATH
1816 Truncate Sentence 1
.py
EASY STRING
912 Sort an Array 3
.py
.cpp
.js
254 Factor Combinations 3
.py
.cpp
MEDIUM DFS
1315 Sum of Nodes with Even-Valued Grandparent 1
.java
MEDIUM RECURSION
DFS
1506 Find Root of N-Ary Tree 1
.cpp
MEDIUM HASH MAP
1472 Design Browser History 1
.cpp
MEDIUM DEQUE
560 Subarray Sum Equals K 4
.cpp
1207 Unique Number of Occurrences 1
.cpp
56 Merge Intervals 1
.py
MEDIUM MATH
148 Sort List 1
.cpp
MEDIUM RECURSION
DIVIDE-AND-CONQUER
SORTING
1457 Pseudo-Palindromic Paths in a Binary Tree 2
.py
MEDIUM BFS
DFS
2220 Minimum Bit Flips to Convert Number 1
.py
EASY MATH
111 Minimum Depth of Binary Tree 1
.cpp
EASY RECURSION
DFS
860 Lemonade Change 1
.cpp
970 Powerful Integers 1
.cpp
2733 Neither Minimum nor Maximum 1
.py
EASY MATH
1602 Find Nearest Right Node in Binary Tree 1
.cpp
MEDIUM BFS
113 Path Sum II 2
.js
MEDIUM RECURSION
QUEUE
DFS
BINARY TREE
BFS
1410 HTML Entity Parser 1
.cpp
MEDIUM STRING
1180 Count Substrings with Only One Distinct Letter 4
.cpp
121 Best Time to Buy and Sell Stock 1
.py
EASY MATH
3083 Existence of a Substring in a String and Its Reverse 1
.py
EASY HASH MAP
679 24 Game 1
.cpp
747 Largest Number At Least Twice of Others 1
.cpp
1362 Closest Divisors 1
.cpp
MEDIUM MATH
2293 Min Max Game 1
.py
EASY RECURSION
572 Subtree of Another Tree 2
.cpp
513 Find Bottom Left Tree Value 1
.py
MEDIUM BFS
742 Closest Leaf in a Binary Tree 1
.py
MEDIUM BFS
DFS
GRAPH
2848 Points That Intersect With Cars 1
.py
EASY LINE SWEEP
1443 Minimum Time to Collect All Apples in a Tree 1
.cpp
MEDIUM DFS
TREE
1190 Reverse Substrings Between Each Pair of Parentheses 1
.cpp
733 Flood Fill 2
.cpp
2352 Equal Row and Column Pairs 1
.py
MEDIUM HASH MAP
1909 Remove One Element to Make the Array Strictly Increasing 1
.py
EASY MATH
BINARY SEARCH
1380 Lucky Numbers in a Matrix 1
.cpp
EASY MATRIX
438 Find All Anagrams in a String 2
.py
.cpp
1175 Prime Arrangements 1
.cpp
26 Remove Duplicates from Sorted Array 1
.py
EASY TWO POINTER
536 Construct Binary Tree from String 1
.cpp
328 Odd Even Linked List 1
.cpp
MEDIUM LINKED LIST
1768 Merge Strings Alternately 1
.go
EASY TWO POINTER
31 Next Permutation 1
.cpp
941 Valid Mountain Array 2
.cpp
.java
1854 Maximum Population Year 1
.cpp
EASY LINE SWEEP
1374 Generate a String With Characters That Have Odd Counts 1
.py
EASY STRING
131 Palindrome Partitioning 1
.cpp
MEDIUM DFS
340 Longest Substring with At Most K Distinct Characters 1
.cpp
HARD TWO POINTER
SLIDING WINDOW
791 Custom Sort String 2
.cpp
1469 Find All the Lonely Nodes 1
.cpp
EASY DFS
1200 Minimum Absolute Difference 2
.py
.cpp
EASY SORTING
3128 Right Triangles 1
.py
MEDIUM MATH
HASH MAP
515 Find Largest Value in Each Tree Row 2
.cpp
2006 Count Number of Pairs With Absolute Difference K 1
.py
EASY HASH MAP
377 Combination Sum IV 1
.py
MEDIUM DP
1006 Clumsy Factorial 1
.cpp
2160 Minimum Sum of Four Digit Number After Splitting Digits 1
.py
EASY MATH
2129 Capitalize the Title 1
.py
EASY TWO POINTER
2124 Check if All A's Appears Before All B's 1
.py
EASY STRING
1694 Reformat Phone Number 1
.py
EASY STRING
387 First Unique Character in a String 1
.py
EASY HASH MAP
1027 Longest Arithmetic Sequence 1
.cpp
MEDIUM DP
973 K Closest Points to Origin 2
.cpp
.java
215 Kth Largest Element in an Array 2
.cpp
MEDIUM PARTITION
ARRAY
BINARY SEARCH
2316 Count Unreachable Pairs of Nodes in an Undirected Graph 2
.py
MEDIUM BFS
DFS
GRAPH
1290 Convert Binary Number in a Linked List to Integer 1
.cpp
EASY LINKED LIST
BINARY NUMBER
2446 Determine if Two Events Have Conflict 1
.py
EASY MATH
594 Longest Harmonious Subsequence 1
.cpp
EASY HASH MAP
896 Monotonic Array 2
.cpp
1260 Shift 2D Grid 1
.cpp
EASY GRID
SIMULATION
797 All Paths From Source to Target 1
.py
MEDIUM DFS
GRAPH
2728 Count Houses in a Circular Street 1
.rs
EASY DESIGN
1021 Remove Outermost Parentheses 1
.cpp
543 Diameter of Binary Tree 1
.cpp
EASY RECURSION
DFS
451 Sort Characters By Frequency 2
.cpp
2259 Remove Digit From Number to Maximize Result 1
.py
EASY BRUTEFORCE
518 Coin Change 2 1
.cpp
537 Complex Number Multiplication 2
.js
.cpp
1037 Valid Boomerang 3
.cpp
2824 Count Pairs Whose Sum is Less than Target 1
.py
EASY TWO POINTER
1314 Matrix Block Sum 1
.cpp
MEDIUM DP
106 Construct Binary Tree from Inorder and Postorder Traversal 2
.cpp
186 Reverse Words in a String II 2
.cpp
1143 Longest Common Subsequence 1
.cpp
MEDIUM DP
1167 Minimum Cost to Connect Sticks 2
.py
.cpp
1128 Number of Equivalent Domino Pairs 1
.cpp
77 Combinations 1
.py
MEDIUM BITMASK
117 Populating Next Right Pointers in Each Node II 1
.py
MEDIUM BFS
89 Gray Code 1
.py
MEDIUM MATH
RECURSION
2578 Split With Minimum Sum 3
.py
EASY GREEDY
MATH
HEAP
PRIORITY QUEUE
SORTING
806 Number of Lines to Write String 3
.cpp
.java
1080 Insufficient Nodes in Root to Leaf Paths 1
.java
1365 How Many Numbers Are Smaller Than the Current Number 1
.cpp
EASY BINARY SEARCH
206 Reverse Linked List 1
.js
EASY RECURSION
LINKED LIST
1456 Maximum Number of Vowels in a Substring of Given Length 1
.py
MEDIUM SLIDING WINDOW
476 Number Complement 5
.cpp
.js
.java
1612 Check If Two Expression Trees are Equivalent 1
.cpp
MEDIUM DFS
409 Longest Palindrome 2
.py
.cpp
EASY HASH MAP
392 Is Subsequence 1
.cpp
814 Binary Tree Pruning 2
.cpp
905 Sort Array By Parity 4
.cpp
1680 Concatenation of Consecutive Binary Numbers 1
.cpp
MEDIUM MATH
2833 Furthest Point From Origin 1
.py
EASY MATH
HASH MAP
671 Second Minimum Node In a Binary Tree 5
.java
160 Intersection of Two Linked Lists 1
.cpp
1248 Count Number of Nice Subarrays 1
.java
MEDIUM PREFIX SUM
2133 Check if Every Row and Column Contains All Numbers 1
.py
EASY MATH
681 Next Closest Time 1
.cpp
2855 Minimum Right Shifts to Sort the Array 1
.py
EASY ARRAY
22 Generate Parentheses 2
.cpp
661 Image Smoother 2
.cpp
.java
1230 Toss Strange Coins 1
.cpp
98 Validate Binary Search Tree 1
.py
MEDIUM RECURSION
1572 Matrix Diagonal Sum 1
.py
EASY MATH
1973 Count Nodes Equal to Sum of Descendants 1
.py
MEDIUM RECURSION
DFS
856 Score of Parentheses 4
.cpp
2331 Evaluate Boolean Binary Tree 1
.py
EASY RECURSION
DFS
1338 Reduce Array Size to The Half 1
.py
MEDIUM HASH MAP
230 Kth Smallest Element in a BST 9
.py
.cpp
.java
MEDIUM RECURSION
1379 Find a Corresponding Node of a Binary Tree in a Clone of That Tree 1
.py
EASY DFS
1566 Detect Pattern of Length M Repeated K or More Times 1
.py
EASY BRUTEFORCE
2427 Number of Common Factors 1
.py
EASY MATH
GCD
1160 Find Words That Can Be Formed by Characters 1
.cpp
844 Backspace String Compare 3
.cpp
.js
.java
2490 Circular Sentence 1
.py
EASY STRING
37 Sudoku Solver 1
.cpp
HARD DFS
BACKTRACKING
709 To Lower Case 3
.cpp
.c
482 License Key Formatting 2
.cpp
441 Arranging Coins 1
.py
EASY MATH
2652 Sum Multiples 1
.py
EASY MATH
889 Construct Binary Tree from Preorder and Postorder Traversal 1
.cpp
MEDIUM RECURSION
2481 Minimum Cuts to Divide a Circle 1
.py
EASY MATH
507 Perfect Number 2
.cpp
1122 Relative Sort Array 3
.cpp
144 Binary Tree Preorder Traversal 1
.rs
EASY RECURSION
DFS
393 UTF-8 Validation 1
.cpp
1791 Find Center of Star Graph 1
.py
MEDIUM GRAPH
1035 Uncrossed Lines 2
.py
MEDIUM DP
1550 Three Consecutive Odds 1
.py
EASY MATH
ARRAY
416 Partition Equal Subset Sum 1
.cpp
MEDIUM DP
DFS
706 Design HashMap 1
.py
MEDIUM DESIGN
1447 Simplified Fractions 1
.py
MEDIUM MATH
GCD
434 Number of Segments in a String 2
.py
.cpp
628 Maximum Product of Three Numbers 2
.cpp
1404 Number of Steps to Reduce a Number in Binary Representation to One 1
.cpp
EASY BINARY
9 Palindrome Number 1
.cpp
EASY
3168 Minimum Number of Chairs in a Waiting Room 1
.py
EASY PREFIX SUM
270 Closest Binary Search Tree Value 1
.py
MEDIUM BINARY SEARCH
1941 Check if All Characters Have Equal Number of Occurrences 1
.go
EASY HASH MAP
94 Binary Tree Inorder Traversal 1
.py
EASY RECURSION
DFS
2348 Number of Zero-Filled Subarrays 1
.py
MEDIUM MATH
366 Find Leaves of Binary Tree 3
.py
.cpp
.java
MEDIUM DFS
987 Vertical Order Traversal of a Binary Tree 1
.cpp
139 Word Break 1
.py
MEDIUM DFS
1503 Last Moment Before All Ants Fall Out of a Plank 1
.py
MEDIUM MATH
2520 Count the Digits That Divide a Number 1
.py
EASY MATH
874 Walking Robot Simulation 1
.cpp
EASY SIMULATION
HASH MAP
994 Rotting Oranges 1
.cpp
EASY BFS
1196 How Many Apples Can You Put into the Basket 1
.cpp
280 Wiggle Sort 2
.cpp
895 Maximum Frequency Stack 1
.cpp
HARD STACK
HASH MAP
342 Power of Four 2
.cpp
2185 Counting Words With a Given Prefix 1
.py
EASY STRING
1022 Sum of Root To Leaf Binary Numbers 2
.cpp
.java
1118 Number of Days in a Month 1
.cpp
3211 Generate Binary Strings Without Adjacent Zeros 1
.py
MEDIUM RECURSION
DFS
329 Longest Increasing Path in a Matrix 1
.py
HARD DP
842 Split Array into Fibonacci Sequence 1
.cpp
606 Construct String from Binary Tree 1
.cpp
922 Sort Array By Parity II 3
.cpp
582 Kill Process 2
.cpp
508 Most Frequent Subtree Sum 1
.cpp
914 X of a Kind in a Deck of Cards 1
.py
EASY MATH
GCD
2869 Minimum Operations to Collect Elements 1
.py
EASY SET
HASH MAP
1748 Sum of Unique Elements 1
.py
EASY MATH
872 Leaf-Similar Trees 1
.py
EASY DFS
1003 Check If Word Is Valid After Substitutions 1
.cpp
MEDIUM STACK
1805 Number of Different Integers in a String 1
.py
EASY STRING
1869 Longer Contiguous Segments of Ones than Zeros 1
.py
EASY GROUPBY
538 Convert BST to Greater Tree 2
.cpp
908 Smallest Range I 1
.cpp
266 Palindrome Permutation 2
.cpp
2149 Rearrange Array Elements by Sign 1
.py
MEDIUM ARRAY
252 Meeting Rooms 2
.cpp
477 Total Hamming Distance 1
.cpp
680 Valid Palindrome II 1
.cpp
219 Contains Duplicate II 1
.py
MEDIUM SLIDING WINDOW
2309 Greatest English Letter in Upper and Lower Case 1
.py
EASY STRING
2164 Sort Even and Odd Indices Independently 1
.py
EASY SORTING
5087 Letter Tile Possibilities 1
.cpp
1018 Binary Prefix Divisible By 5 2
.cpp
.java
1614 Maximum Nesting Depth of the Parentheses 1
.cpp
EASY STRING
2436 Minimum Split Into Subarrays With GCD Greater Than One 1
.py
MEDIUM GREEDY
33 Search in Rotated Sorted Array 2
.cpp
.java
811 Subdomain Visit Count 2
.cpp
167 Two Sum II - Input array is sorted 1
.py
EASY TWO POINTER
2094 Finding 3-Digit Even Numbers 1
.py
EASY MATH
1935 Maximum Number of Words You Can Type 1
.py
EASY HASH MAP
13 Roman to Integer 2
.cpp
1339 Maximum Product of Splitted Binary Tree 1
.py
MEDIUM DFS
1302 Deepest Leaves Sum 2
.cpp
MEDIUM BFS
DFS
2287 Rearrange Characters to Make Target String 1
.py
EASY HASH MAP
993 Cousins in Binary Tree 2
.cpp
34 Find First and Last Position of Element in Sorted Array 3
.cpp
.js
1481 Least Number of Unique Integers after K Removals 1
.py
MEDIUM HASH MAP
821 Shortest Distance to a Character 2
.cpp
3114 Latest Time You Can Obtain After Replacing Characters 1
.py
EASY DECISION TREE
1884 Egg Drop With 2 Eggs and N Floors 1
.py
MEDIUM DP
55 Jump Game 1
.cpp
MEDIUM GREEDY
2579 Count Total Number of Colored Cells 1
.py
MEDIUM MATH
663 Equal Tree Partition 1
.py
MEDIUM DFS
845 Longest Mountain in Array 1
.cpp
MEDIUM ARRAY
783 Minimum Distance Between BST Nodes 1
.py
EASY RECURSION
DFS
311 Sparse Matrix Multiplication 1
.cpp
1295 Find Numbers with Even Number of Digits 1
.cpp
EASY ARRAY
3 Longest Substring Without Repeating Characters 1
.py
MEDIUM TWO POINTER
SLIDING WINDOW
1087 Brace Expansion 2
.cpp
21 Merge Two Sorted Lists 4
.cpp
216 Combination Sum III 1
.py
MEDIUM MATH
DFS
1344 Angle Between Hands of a Clock 1
.cpp
MEDIUM GEOMETRY
159 Longest Substring with At Most Two Distinct Characters 1
.cpp
MEDIUM TWO POINTER
SLIDING WINDOW
HASH MAP
27 Remove Element 1
.py
EASY TWO POINTER
1474 Delete N Nodes After M Nodes of a Linked List 1
.cpp
EASY LINKED LIST
869 Reordered Power of 2 1
.py
MEDIUM MATH
PERMUTATION
1352 Product of the Last K Numbers 1
.cpp
637 Average of Levels in Binary Tree 3
.cpp
2923 Find Champion I 1
.py
EASY GRAPH
2571 Minimum Operations to Reduce an Integer to 0 4
.py
.rs
MEDIUM GREEDY
RECURSION
MATH
BINARY
DP
189 Rotate Array 1
.py
MEDIUM ARRAY
883 Projection Area of 3D Shapes 1
.cpp
929 Unique Email Addresses 3
.js
.cpp
MEDIUM HASH MAP
1528 Shuffle String 1
.py
EASY STRING
43 Multiply Strings 1
.java
MEDIUM ARRAY
2810 Faulty Keyboard 1
.py
EASY QUEUE
1704 Determine if String Halves Are Alike 1
.cpp
EASY STRING
1317 Convert Integer to the Sum of Two No-Zero Integers 1
.java
EASY BRUTEFORCE
384 Shuffle an Array 1
.py
MEDIUM RANDOM
1929 Concatenation of Array 1
.py
EASY ARRAY
362 Design Hit Counter 2
.cpp
2549 Count Distinct Numbers on Board 1
.py
EASY MATH
1502 Can Make Arithmetic Progression From Sequence 1
.cpp
EASY SORTING
276 Paint Fence 2
.py
.cpp
1008 Construct Binary Search Tree from Preorder Traversal 3
.cpp
.java
339 Nested List Weight Sum 1
.cpp
1356 Sort Integers by The Number of 1 Bits 1
.cpp
EASY BIT HACKS
SORTING
2558 Take Gifts From the Richest Pile 1
.py
EASY HEAP
325 Maximum Size Subarray Sum Equals k 5
.cpp
938 Range Sum of BST 2
.cpp
394 Decode String 1
.cpp
2595 Number of Even and Odd Bits 1
.py
EASY MATH
BINARY
38 Count and Say 1
.py
MEDIUM RECURSION
1800 Maximum Ascending Subarray Sum 1
.py
EASY GREEDY
1188 Design Bounded Blocking Queue 1
.py
MEDIUM THREADING
532 K-diff Pairs in an Array 3
.cpp
408 Valid Word Abbreviation 1
.cpp
2802 Find The K-th Lucky Number 3
.py
MEDIUM MATH
BINARY TREE
RECURSION
BINARY
1570 Dot Product of Two Sparse Vectors 1
.cpp
873 Length of Longest Fibonacci Subsequence 2
.cpp
MEDIUM FIBONACCI
DP
LONGEST INCREASE SEQUENCE
BRUTEFORCE
1017 Convert to Base -2 2
.cpp
1291 Sequential Digits 2
.cpp
MEDIUM BFS
DFS
875 Koko Eating Bananas 1
.py
MEDIUM BINARY SEARCH
49 Group Anagrams 2
.py
.cpp
MEDIUM SORTING
125 Valid Palindrome 1
.cpp
566 Reshape the Matrix 4
.cpp
1539 Kth Missing Positive Number 1
.cpp
EASY HASH MAP
1926 Nearest Exit from Entrance in Maze 1
.py
MEDIUM BFS
1100 Find K-Length Substrings With No Repeated Characters 2
.cpp
1415 The k-th Lexicographical String of All Happy Strings of Length n 1
.cpp
MEDIUM RECURSION
DFS
1991 Find the Middle Index in Array 1
.py
EASY PREFIX SUM
1458 Max Dot Product of Two Subsequences 1
.cpp
HARD DP
83 Remove Duplicates from Sorted List 2
.py
EASY TWO POINTER
HASH MAP
1822 Sign of the Product of an Array 1
.go
EASY MATH
2744 Find Maximum Number of String Pairs 1
.py
EASY STRING
HASH MAP
1624 Largest Substring Between Two Equal Characters 2
.py
.cpp
EASY HASH MAP
74 Search a 2D Matrix 3
.cpp
1413 Minimum Value to Get Positive Step by Step Sum 1
.cpp
EASY PREFIX SUM
501 Find Mode in Binary Search Tree 3
.cpp
297 Serialize and Deserialize Binary Tree 1
.cpp
2255 Count Prefixes of a Given String 1
.py
EASY TRIE
2609 Find the Longest Balanced Substring of a Binary String 1
.py
EASY MATH
STRING
876 Middle of the Linked List 2
.cpp
2264 Largest 3-Same-Digit Number in String 1
.py
EASY MATH
BRUTEFORCE
374 Guess Number Higher or Lower 2
.cpp
1876 Substrings of Size Three with Distinct Characters 1
.py
EASY STRING
1133 Largest Unique Number 5
.py
.cpp
.js
1282 Group the People Given the Group Size They Belong To 1
.cpp
MEDIUM GREEDY
HASH MAP
16 3Sum Closest 1
.cpp
1605 Find Valid Matrix Given Row and Column Sums 1
.cpp
MEDIUM GREEDY
1269 Number of Ways to Stay in the Same Place After Some Steps 1
.py
HARD RECURSION
DP
15 3Sum 2
.cpp
1392 Longest Happy Prefix 1
.py
2022 Convert 1D Array Into 2D Array 1
.py
EASY ARRAY
1120 Maximum Average Subtree 2
.py
.cpp
MEDIUM DFS
2553 Separate the Digits in an Array 1
.py
EASY MATH
442 Find All Duplicates in an Array 1
.py
MEDIUM
228 Summary Ranges 1
.cpp
MEDIUM TWO POINTER
261 Graph Valid Tree 2
.cpp
965 Univalued Binary Tree 2
.cpp
492 Construct the Rectangle 3
.java
999 Available Captures for Rook 1
.cpp
1267 Count Servers that Communicate 1
.py
MEDIUM HASH MAP
1002 Find Common Characters 2
.cpp
.java
EASY STRING
ARRAY
520 Detect Capital 1
.js
EASY REGEXP
STRING
633 Sum of Square Numbers 2
.cpp
1222 Queens That Can Attack the King 1
.cpp
MEDIUM ARRAY
HASH MAP
322 Coin Change 2
.cpp
819 Most Common Word 2
.cpp
2582 Pass the Pillow 1
.py
EASY MATH
133 Clone Graph 2
.cpp
.java
1725 Number Of Rectangles That Can Form The Largest Square 1
.py
EASY MATH
525 Contiguous Array 1
.cpp
MEDIUM PREFIX SUM
ARRAY
HASH MAP
237 Delete Node in a Linked List 1
.py
EASY LINKED LIST
690 Employee Importance 4
.cpp
.java
3074 Apple Redistribution into Boxes 2
.py
EASY GREEDY
BINARY SEARCH
395 Longest Substring with At Least K Repeating Characters 1
.cpp
MEDIUM DIVIDE-AND-CONQUER
1328 Break a Palindrome 1
.js
MEDIUM
867 Transpose Matrix 1
.cpp
988 Smallest String Starting From Leaf 1
.cpp
MEDIUM DFS
1265 Print Immutable Linked List in Reverse 2
.cpp
MEDIUM RECURSION
LINKED LIST
STACK
1952 Three Divisors 1
.py
EASY MATH
1400 Construct K Palindrome Strings 1
.cpp
MEDIUM PALINDROME
BITSET
1925 Count Square Sum Triples 1
.py
EASY MATH
946 Validate Stack Sequences 1
.cpp
MEDIUM GREEDY
STACK
2847 Smallest Number With Given Digit Product 1
.py
MEDIUM MATH
GREEDY
39 Combination Sum 1
.cpp
1288 Remove Covered Intervals 1
.cpp
MEDIUM LINE SWEEP
SORTING
6 ZigZag Conversion 1
.cpp
MEDIUM STRING
SIMULATION
991 Broken Calculator 1
.cpp
944 Delete Columns to Make Sorted 1
.cpp
931 Minimum Falling Path Sum 1
.cpp
1221 Split a String in Balanced Strings 1
.cpp
146 LRU Cache 1
.cpp
MEDIUM LINKED LIST
LRU
2980 Check if Bitwise OR Has Trailing Zeros 1
.py
EASY MATH
779 K-th Symbol in Grammar 1
.py
MEDIUM RECURSION
1060 Missing Element in Sorted Array 2
.cpp
1220 Count Vowels Permutation 1
.cpp
HARD DP
1154 Day of the Year 1
.cpp
EASY MATH
DATE
3046 Split the Array 1
.py
EASY HASH MAP
915 Partition Array into Disjoint Intervals 1
.cpp
24 Swap Nodes in Pairs 1
.cpp
MEDIUM RECURSION
51 N-Queens 1
.cpp
HARD RECURSION
DFS
BACKTRACKING
2706 Buy Two Chocolates 1
.py
EASY SEARCH
59 Spiral Matrix II 1
.java
MEDIUM SIMULATION
353 Design Snake Game 1
.cpp
2335 Minimum Amount of Time to Fill Cups 1
.py
EASY MATH
2229 Check if an Array Is Consecutive 1
.py
EASY SORTING
1880 Check if Word Equals Summation of Two Words 1
.py
EASY MATH
1513 Number of Substrings With Only 1s 1
.py
MEDIUM MATH
1387 Sort Integers by The Power Value 1
.cpp
MEDIUM RECURSION
DP
250 Count Univalue Subtrees 5
.cpp
.java
884 Uncommon Words from Two Sentences 2
.java
1399 Count Largest Group 1
.cpp
EASY
892 Surface Area of 3D Shapes 3
.py
.cpp
EASY MATH
COUNTING
GEOMETRY
1047 Remove All Adjacent Duplicates In String 4
.py
.cpp
205 Isomorphic Strings 1
.cpp
969 Pancake Sorting 1
.cpp
MEDIUM ARRAY
2894 Divisible and Non-divisible Sums Difference 1
.py
EASY MATH
1261 Find Elements in a Contaminated Binary Tree 1
.cpp
MEDIUM DFS
2165 Smallest Value of the Rearranged Number 1
.py
MEDIUM SORTING
3174 Clear Digits 1
.py
EASY STACK
437 Path Sum III 1
.cpp
1273 Delete Tree Nodes 1
.cpp
1272 Remove Interval 1
.cpp
MEDIUM INTERVAL
347 Top K Frequent Elements 2
.cpp
389 Find the Difference 1
.py
EASY XOR
2864 Maximum Odd Binary Number 1
.py
EASY MATH
BINARY
207 Course Schedule 1
.py
MEDIUM TOPOLOGICAL SORT
GRAPH
3232 Find if Digit Game Can Be Won 1
.py
EASY MATH
GAME
1228 Missing Number In Arithmetic Progression 1
.cpp
766 Toeplitz Matrix 2
.cpp
724 Find Pivot Index 2
.cpp
942 DI String Match 2
.cpp
.java
47 Permutations II 1
.cpp
MEDIUM PERMUTATION
DFS
HASH MAP
1026 Maximum Difference Between Node and Ancestor 1
.cpp
1437 Check If All 1's Are at Least Length K Places Away 1
.cpp
MEDIUM ARRAY
290 Word Pattern 1
.cpp
EASY HASH MAP
129 Sum Root to Leaf Numbers 1
.py
MEDIUM BFS
1020 Partition Array Into Three Parts With Equal Sum 1
.cpp
2011 Final Value of Variable After Performing Operations 1
.py
EASY LAMBDA
1436 Destination City 1
.cpp
EASY TREE
2248 Intersection of Multiple Arrays 1
.py
EASY HASH MAP
1171 Remove Zero Sum Consecutive Nodes from Linked List 1
.cpp
MEDIUM PREFIX SUM
LINKED LIST
653 Two Sum IV Input is a BST 6
.cpp
.java
1185 Day of the Week 1
.cpp
190 Reverse Bits 1
.py
EASY MATH
744 Find Smallest Letter Greater Than Target 4
.js
.cpp
976 Largest Perimeter Triangle 3
.py
.cpp
.java
EASY TRIANGLE
GREEDY
ARRAY
SORTING
348 Design Tic-Tac-Toe 1
.cpp
1281 Subtract the Product and Sum of Digits of an Integer 1
.cpp
EASY MATH
346 Moving Average from Data Stream 1
.cpp
EASY DEQUE
2753 Count Houses in a Circular Street II 1
.py
HARD DESIGN
334 Increasing Triplet Subsequence 2
.py
.cpp
MEDIUM MATH
1897 Redistribute Characters to Make All Strings Equal 2
.py
.go
EASY STRING
HASH MAP
2600 K Items With the Maximum Sum 1
.py
EASY MATH
917 Reverse Only Letters 3
.cpp
.java
701 Insert into a Binary Search Tree 2
.cpp
MEDIUM RECURSION
TREE
516 Longest Palindromic Subsequence 1
.py
MEDIUM DP
1161 Maximum Level Sum of a Binary Tree 1
.cpp
2510 Check if There is a Path With Equal Number of 0's And 1's 1
.py
MEDIUM DP
746 Min Cost Climbing Stairs 2
.cpp
2710 Remove Trailing Zeros From a String 1
.py
EASY STRING
1971 Find if Path Exists in Graph 1
.py
EASY BFS
GRAPH
367 Valid Perfect Square 4
.cpp
2032 Two Out of Three 1
.py
EASY HASH MAP
693 Binary Number with Alternating Bits 2
.cpp
1984 Minimum Difference Between Highest and Lowest of K Scores 1
.py
EASY SORTING
2437 Number of Valid Clock Times 1
.py
EASY MATH
445 Add Two Numbers II 1
.cpp
MEDIUM LINKED LIST
STACK
684 Redundant Connection 1
.cpp
MEDIUM UNION FIND
2544 Alternating Digit Sum 1
.py
EASY MATH
247 Strobogrammatic Number II 1
.cpp
MEDIUM RECURSION
300 Longest Increasing Subsequence 1
.cpp
12 Integer to Roman 1
.py
MEDIUM MATH
STRING
951 Flip Equivalent Binary Trees 2
.cpp
50 Pow(x, n) 1
.cpp
MEDIUM RECURSION
1094 Car Pooling 2
.cpp
MEDIUM GREEDY
HASH MAP
201 Bitwise AND of Numbers Range 1
.cpp
MEDIUM BIT
859 Buddy Strings 1
.cpp
1005 Maximize Sum Of Array After K Negations 2
.cpp
EASY PRIORITY QUEUE
ARRAY
2177 Find Three Consecutive Integers That Sum to a Given Number 1
.py
MEDIUM MATH
401 Binary Watch 1
.cpp
933 Number of Recent Calls 2
.cpp
.java
1346 Check If N and Its Double Exist 1
.go
EASY HASH MAP
2139 Minimum Moves to Reach Target Score 1
.py
MEDIUM GREEDY
841 Keys and Rooms 1
.cpp
937 Reorder Data in Log Files 1
.cpp
EASY SORTING
2915 Length of the Longest Subsequence That Sums to Target 1
.py
MEDIUM DP
KNAPSACK
609 Find Duplicate File in System 1
.js
MEDIUM HASH MAP
1244 Design A Leaderboard 1
.cpp
MEDIUM MULTI SET
HASH MAP
958 Check Completeness of a Binary Tree 2
.cpp
.java
2099 Find Subsequence of Length K With the Largest Sum 1
.py
EASY SLIDING WINDOW
1208 Get Equal Substrings Within Budget 1
.cpp
1920 Build Array from Permutation 1
.py
EASY ARRAY
256 Paint House 1
.cpp
704 Binary Search 1
.java
217 Contains Duplicate 1
.js
EASY HASH MAP
1071 Greatest Common Divisor of Strings 1
.cpp
1485 Clone Binary Tree With Random Pointer 1
.cpp
MEDIUM RECURSION
HASH MAP
18 4Sum 1
.cpp
1490 Clone N-ary Tree 1
.cpp
MEDIUM RECURSION
DFS
HASH MAP
150 Evaluate Reverse Polish Notation 1
.py
MEDIUM STACK
1837 Sum of Digits in Base K 1
.py
EASY MATH
634 Find the Derangement of An Array 1
.py
MEDIUM MATH
DP
2696 Minimum String Length After Removing Substrings 1
.py
EASY STACK
1137 N-th Tribonacci Number 2
.cpp
953 Verifying an Alien Dictionary 1
.cpp
3101 Count Alternating Subarrays 1
.py
MEDIUM DP
23 Merge k Sorted Lists 1
.cpp
HARD RECURSION
DIVIDE-AND-CONQUER
760 Find Anagram Mappings 3
.cpp
.java
2924 Find Champion II 1
.py
MEDIUM GRAPH
1165 Single-Row Keyboard 2
.cpp
EASY STRING
HASH MAP
52 N-Queens II 1
.cpp
HARD RECURSION
DFS
BACKTRACKING
2265 Count Nodes Equal to Average of Subtree 1
.py
MEDIUM DFS
1135 Connecting Cities With Minimum Cost 2
.cpp
743 Network Delay Time 1
.py
MEDIUM GRAPH
669 Trim a Binary Search Tree 1
.cpp
415 Add Strings 2
.py
.cpp
EASY MATH
1874 Minimize Product Sum of Two Arrays 1
.go
MEDIUM GREEDY
921 Minimum Add to Make Parentheses Valid 1
.cpp
2485 Find the Pivot Integer 1
.py
EASY MATH
836 Rectangle Overlap 1
.cpp
EASY GEOMETRY
246 Strobogrammatic Number 2
.cpp
2101 Detonate the Maximum Bombs 1
.py
MEDIUM DFS
703 Kth Largest Element in a Stream 1
.cpp
5453 Running Sum of 1d Array 1
.cpp
EASY PREFIX SUM
1396 Design Underground System 1
.cpp
MEDIUM HASH MAP
650 2 Keys Keyboard 1
.py
MEDIUM DP
2717 Semi-Ordered Permutation 1
.py
EASY MATH
251 Flatten 2D Vector 2
.cpp
643 Maximum Average Subarray I 4
.js
.cpp
.java
1184 Distance Between Bus Stops 1
.py
EASY MATH
GRAPH
541 Reverse String II 1
.cpp
1518 Water Bottles 1
.java
EASY SIMULATION
1522 Diameter of N-Ary Tree 1
.cpp
MEDIUM DFS
945 Minimum Increment to Make Array Unique 1
.py
MEDIUM GREEDY
SORTING
105 Construct Binary Tree from Preorder and Inorder Traversal 1
.cpp
2529 Maximum Count of Positive Integer and Negative Integer 1
.py
EASY BINARY SEARCH
2368 Reachable Nodes With Restrictions 1
.py
MEDIUM DFS
GRAPH
897 Increasing Order Search Tree 4
.py
.cpp
EASY RECURSION
1598 Crawler Log Folder 1
.cpp
EASY SIMULATION
997 Find the Town Judge 1
.java
101 Symmetric Tree 1
.py
EASY RECURSION
DFS
103 Binary Tree Zigzag Level Order Traversal 3
.py
.cpp
MEDIUM BFS
82 Remove Duplicates from Sorted List II 1
.cpp
MEDIUM LINKED LIST
1232 Check If It Is a Straight Line 1
.cpp
EASY GEOMETRY
1249 Minimum Remove to Make Valid Parentheses 1
.cpp
MEDIUM GREEDY
PARENTHESES
949 Largest Time for Given Digits 1
.cpp
EASY PERMUTATION
589 N-ary Tree Preorder Traversal 1
.py
EASY STACK
799 Champagne Tower 1
.py
MEDIUM DP
1422 Maximum Score After Splitting a String 1
.cpp
EASY PREFIX SUM
1197 Minimum Knight Moves 1
.py
MEDIUM DP
812 Largest Triangle Area 1
.cpp
830 Positions of Large Groups 2
.cpp
.java
1576 Replace All ?'s to Avoid Consecutive Repeating Characters 1
.cpp
EASY STRING
985 Sum of Even Numbers After Queries 2
.js
.java
28 Implement strStr() 1
.cpp
2443 Sum of Number and Its Reverse 1
.py
MEDIUM BRUTEFORCE
1382 Balance a Binary Search Tree 2
.py
.cpp
MEDIUM RECURSION
BINARY TREE
242 Valid Anagram 1
.cpp
EASY STRING
HASH MAP
1796 Second Largest Digit in a String 1
.cpp
EASY STRING
HASH MAP
967 Numbers With Same Consecutive Differences 1
.py
MEDIUM DFS
2769 Find the Maximum Achievable Number 1
.py
EASY MATH
GREEDY
433 Minimum Genetic Mutation 1
.py
MEDIUM BFS
804 Unique Morse Code Words 2
.cpp
.java
166 Fraction to Recurring Decimal 1
.java
MEDIUM MATH
HASH MAP
91 Decode Ways 1
.cpp
2639 Find the Width of Columns of a Grid 1
.py
EASY MATH
MATRIX
170 Two Sum III - Data structure design 3
.cpp
EASY DESIGN
264 Ugly Number II 1
.py
MEDIUM MATH
HEAP
700 Search in a Binary Search Tree 6
.cpp
.js
.java
686 Repeated String Match 2
.js
2697 Lexicographically Smallest Palindrome 1
.py
EASY TWO POINTER
645 Set Mismatch 3
.cpp
1119 Remove Vowels from a String 1
.cpp
1237 Find Positive Integer Solution for a Given Equation 2
.cpp
EASY TWO POINTER
BINARY SEARCH

Database

ID Blog Solutions Diffculty Tags
608 Tree Node 4
.sql
MEDIUM SQL
3054 Binary Tree Nodes 1
.sql
MEDIUM SQL
612 Shortest Distance in a Plane 4
.sql
MEDIUM SQL
176 Second Highest Salary 1
.sql
EASY MATH
SQL
577 Employee Bonus 1
.sql
EASY SQL
570 Managers with at Least 5 Direct Reports 2
.sql
MEDIUM SQL
584 Find Customer Referee 1
.sql
EASY SQL
627 Swap Salary 2
.sql
EASY SQL
619 Biggest Single Number 1
.sql
EASY SQL

Total 585 Questions: 9 Database, 576 Algorithms

By Difficulty

By Programming Language

By Tag

Index generated by script at 23/10/2024 21:54:07