| 38 |
Count and Say |
Python |
O(n) |
O(n) |
Explanation |
| 50 |
Pow(x, n) |
Python |
O(n) |
O(n) |
Explanation |
| 71 |
Simplify Path |
Python |
O(n) |
O(n) |
Explanation |
| 73 |
Set Matrix Zeroes |
JavaScript |
O(n) |
O(n) |
Explanation |
| 107 |
Binary Tree Level Order Traversal II |
Python |
O(n) |
O(n) |
Explanation |
| 150 |
Evaluate Reverse Polish Notation |
TypeScript |
O(n) |
O(n) |
Explanation |
| 187 |
Repeated DNA Sequences |
Python |
O(n) |
O(n) |
Explanation |
| 198 |
House Robber |
JavaScript, Python |
O(n) |
O(n) |
Explanation |
| 204 |
Count Primes |
JavaScript, Python |
O(n) |
O(n) |
Explanation |
| 316 |
Remove Duplicate Letters |
Python |
O(n) |
O(n) |
Explanation |
| 331 |
Verify Preorder Serialization of a Binary Tree |
JavaScript |
O(n) |
O(n) |
Explanation |
| 385 |
Mini Parser |
JavaScript |
O(n) |
O(n) |
Explanation |
| 388 |
Longest Absolute File Path |
JavaScript |
O(n) |
O(n) |
Explanation |
| 402 |
Remove K Digits |
Python |
O(n) |
O(n) |
Explanation |
| 406 |
Queue Reconstruction by Height |
JavaScript |
O(n) |
O(n) |
Explanation |
| 429 |
N-ary Tree Level Order Traversal |
Python |
O(n) |
O(n) |
Explanation |
| 515 |
Find Largest Value in Each Tree Row |
Python |
O(n) |
O(n) |
Explanation |
| 539 |
Minimum Time Difference |
Python |
O(n) |
O(n) |
Explanation |
| 550 |
Game Play Analysis IV |
Python |
O(n) |
O(n) |
Explanation |
| 606 |
Construct String from Binary Tree |
Python |
O(n) |
O(n) |
Explanation |
| 622 |
Design Circular Queue |
JavaScript |
O(n) |
O(n) |
Explanation |
| 636 |
Exclusive Time of Functions |
TypeScript |
O(n) |
O(n) |
Explanation |
| 670 |
Maximum Swap |
Python |
O(n) |
O(n) |
Explanation |
| 735 |
Asteroid Collision |
JavaScript |
O(n) |
O(n) |
Explanation |
| 799 |
Champagne Tower |
Python |
O(n) |
O(n) |
Explanation |
| 861 |
Score After Flipping Matrix |
Python |
O(n) |
O(n) |
Explanation |
| 901 |
Online Stock Span |
JavaScript |
O(n) |
O(n) |
Explanation |
| 918 |
Maximum Sum Circular Subarray |
JavaScript |
O(n) |
O(n) |
Explanation |
| 921 |
Minimum Add to Make Parentheses Valid |
Python |
O(n) |
O(n) |
Explanation |
| 950 |
Reveal Cards In Increasing Order |
JavaScript |
O(n) |
O(n) |
Explanation |
| 1003 |
Check If Word Is Valid After Substitutions |
JavaScript |
O(n) |
O(n) |
Explanation |
| 1016 |
Binary String With Substrings Representing 1 To N |
Python |
O(n) |
O(n) |
Explanation |
| 1104 |
Path In Zigzag Labelled Binary Tree |
JavaScript |
O(n) |
O(n) |
Explanation |
| 1111 |
Maximum Nesting Depth of Two Valid Parentheses Strings |
C++ |
O(n) |
O(n) |
Explanation |
| 1129 |
Shortest Path with Alternating Colors |
Python |
O(n) |
O(n) |
Explanation |
| 1190 |
Reverse Substrings Between Each Pair of Parentheses |
C++ |
O(n) |
O(n) |
Explanation |
| 1209 |
Remove All Adjacent Duplicates in String II |
Python |
O(n) |
O(n) |
Explanation |
| 1302 |
Deepest Leaves Sum |
Python |
O(n) |
O(n) |
Explanation |
| 1314 |
Matrix Block Sum |
JavaScript |
O(n) |
O(n) |
Explanation |
| 1325 |
Delete Leaves With a Given Value |
JavaScript |
O(n) |
O(n) |
Explanation |
| 1441 |
Build an Array With Stack Operations |
TypeScript |
O(n) |
O(n) |
Explanation |
| 1443 |
Minimum Time to Collect All Apples in a Tree |
Python |
O(n) |
O(n) |
Explanation |
| 1524 |
Number of Sub-arrays With Odd Sum |
Python |
O(n) |
O(n) |
Explanation |
| 1541 |
Minimum Insertions to Balance a Parentheses String |
Python |
O(n) |
O(n) |
Explanation |
| 1605 |
Find Valid Matrix Given Row and Column Sums |
Python |
O(n) |
O(n) |
Explanation |
| 1620 |
Coordinate With Maximum Network Quality |
Python |
O(n) |
O(n) |
Explanation |
| 1631 |
Path With Minimum Effort |
Python |
O(n) |
O(n) |
Explanation |
| 1701 |
Average Waiting Time |
Python |
O(n) |
O(n) |
Explanation |
| 1702 |
Maximum Binary String After Change |
Python |
O(n) |
O(n) |
Explanation |
| 1705 |
Maximum Number of Eaten Apples |
Python |
O(n) |
O(n) |
Explanation |
| 1727 |
Largest Submatrix With Rearrangements |
Python |
O(n) |
O(n) |
Explanation |
| 1738 |
Find Kth Largest XOR Coordinate Value |
JavaScript |
O(n) |
O(n) |
Explanation |
| 1878 |
Get Biggest Three Rhombus Sums in a Grid |
Python |
O(n) |
O(n) |
Explanation |
| 1894 |
Find the Student that Will Replace the Chalk |
Python |
O(n) |
O(n) |
Explanation |
| 1922 |
Count Good Numbers |
Python |
O(n) |
O(n) |
Explanation |
| 1975 |
Maximum Matrix Sum |
Python |
O(n) |
O(n) |
Explanation |
| 2017 |
Grid Game |
Python |
O(n) |
O(n) |
Explanation |
| 2033 |
Minimum Operations to Make a Uni-Value Grid |
Python |
O(n) |
O(n) |
Explanation |
| 2104 |
Sum of Subarray Ranges |
Python |
O(n) |
O(n) |
Explanation |
| 2222 |
Number of Ways to Select Buildings |
JavaScript |
O(n) |
O(n) |
Explanation |
| 2257 |
Count Unguarded Cells in the Grid |
JavaScript |
O(n) |
O(n) |
Explanation |
| 2320 |
Count Number of Ways to Place Houses |
Python |
O(n) |
O(n) |
Explanation |
| 2375 |
Construct Smallest Number From DI String |
Python |
O(n) |
O(n) |
Explanation |
| 2380 |
Time Needed to Rearrange a Binary String |
JavaScript |
O(n) |
O(n) |
Explanation |
| 2390 |
Removing Stars From a String |
JavaScript |
O(n) |
O(n) |
Explanation |
| 2434 |
Using a Robot to Print the Lexicographically Smallest String |
C++ |
O(n) |
O(n) |
Explanation |
| 2467 |
Most Profitable Path in a Tree |
JavaScript |
O(n) |
O(n) |
Explanation |
| 2477 |
Minimum Fuel Cost to Report to the Capital |
JavaScript |
O(n) |
O(n) |
Explanation |
| 2536 |
Increment Submatrices by One |
Python |
O(n) |
O(n) |
Explanation |
| 2596 |
Check Knight Tour Configuration |
Python |
O(n) |
O(n) |
Explanation |
| 2673 |
Make Costs of Paths Equal in a Binary Tree |
JavaScript |
O(n) |
O(n) |
Explanation |
| 2684 |
Maximum Number of Moves in a Grid |
Python |
O(n) |
O(n) |
Explanation |
| 2685 |
Count the Number of Complete Components |
Java, Python |
O(n) |
O(n) |
Explanation |
| 2708 |
Maximum Strength of a Group |
Python |
O(n) |
O(n) |
Explanation |
| 2718 |
Sum of Matrix After Queries |
Python |
O(n) |
O(n) |
Explanation |
| 2745 |
Construct the Longest New String |
Python |
O(n) |
O(n) |
Explanation |
| 2866 |
Beautiful Towers II |
Python |
O(n) |
O(n) |
Explanation |
| 2906 |
Construct Product Matrix |
Python |
O(n) |
O(n) |
Explanation |
| 2943 |
Maximize Area of Square Hole in Grid |
JavaScript |
O(n) |
O(n) |
Explanation |
| 3015 |
Count the Number of Houses at a Certain Distance I |
JavaScript |
O(n) |
O(n) |
Explanation |
| 3030 |
Find the Grid of Region Average |
Python |
O(n) |
O(n) |
Explanation |
| 3234 |
Count the Number of Substrings With Dominant Ones |
Python |
O(n) |
O(n) |
Explanation |
| 3310 |
Remove Methods From Project |
C++ |
O(n) |
O(n) |
Explanation |
| 3331 |
Find Subtree Sizes After Changes |
JavaScript |
O(n) |
O(n) |
Explanation |
| 3393 |
Count Paths With the Given XOR Value |
Python |
O(n) |
O(n) |
Explanation |
| 3394 |
Check if Grid can be Cut into Sections |
JavaScript |
O(n) |
O(n) |
Explanation |
| 3403 |
Find the Lexicographically Largest String From the Box I |
Python |
O(n) |
O(n) |
Explanation |
| 3419 |
Minimize the Maximum Edge Weight of Graph |
JavaScript |
O(n) |
O(n) |
Explanation |
| 3513 |
Number of Unique XOR Triplets I |
C++ |
O(n) |
O(n) |
Explanation |
| 3532 |
Path Existence Queries in a Graph I |
Java |
O(n) |
O(n) |
Explanation |
| 3546 |
Equal Sum Grid Partition I |
Python |
O(n) |
O(n) |
Explanation |
| 3551 |
Minimum Swaps to Sort by Digit Sum |
Python |
O(n) |
O(n) |
Explanation |
| 3558 |
Number of Ways to Assign Edge Weights I |
Java |
O(n) |
O(n) |
Explanation |
| 3561 |
Resulting String After Adjacent Removals |
Python |
O(n) |
O(n) |
Explanation |
| 3634 |
Minimum Removals to Balance Array |
Python |
O(n) |
O(n) |
Explanation |
| 3638 |
Maximum Balanced Shipments |
Python |
O(n) |
O(n) |
Explanation |
| 3650 |
Minimum Cost Path with Edge Reversals |
JavaScript |
O(n) |
O(n) |
Explanation |
| 3665 |
Twisted Mirror Path Count |
Python |
O(n) |
O(n) |
Explanation |
| 3694 |
Distinct Points Reachable After Substring Removal |
Python |
O(n) |
O(n) |
Explanation |
| 3727 |
Maximum Alternating Sum of Squares |
JavaScript |
O(n) |
O(n) |
Explanation |
| 3746 |
Minimum String Length After Balanced Removals |
Python |
O(n) |
O(n) |
Explanation |
| 3765 |
Complete Prime Number |
JavaScript |
O(n) |
O(n) |
Explanation |
| 3858 |
Minimum Bitwise OR From Grid |
Python |
O(n) |
O(n) |
Explanation |
| 3988 |
Create Grid With Exactly K Paths I |
Python |
O(n) |
O(n) |
Explanation |
| 4002 |
Count Valid Sequences |
JavaScript |
O(n) |
O(n) |
Explanation |
| 4044 |
Count Good Cyclic Rotations |
Python |
O(n) |
O(n) |
Explanation |
| 4054 |
Count Shadow Pairs I |
Python |
O(n) |
O(n) |
Explanation |
| 4062 |
Transform Array Using Pair Operations |
Python |
O(n) |
O(n) |
Explanation |