C++ LeetCode Typing Practice
1798 LeetCode solutions in C++. Pick one to type it and see your WPM and accuracy.
- 01 Matrix · 35 lines
- 132 Pattern · 24 lines
- 1-bit and 2-bit Characters · 19 lines
- 24 Game · 34 lines
- 2 Keys Keyboard · 38 lines
- 3Sum · 31 lines
- 3Sum Closest · 22 lines
- 3Sum With Multiplicity · 64 lines
- 4Sum · 88 lines
- 4Sum II · 36 lines
- Abbreviating the Product of a Range · 72 lines
- Accounts Merge · 64 lines
- Add Binary · 22 lines
- Add Digits · 6 lines
- Adding Spaces to a String · 25 lines
- Adding Two Negabinary Numbers · 32 lines
- Additive Number · 41 lines
- Add Minimum Number of Rungs · 38 lines
- Add One Row to Tree · 22 lines
- Add Strings · 29 lines
- Add to Array-Form of Integer · 49 lines
- Add Two Integers · 6 lines
- Add Two Numbers · 26 lines
- Add Two Numbers II · 43 lines
- Advantage Shuffle · 34 lines
- Airplane Seat Assignment Probability · 7 lines
- Alert Using Same Key-Card Three or More Times in a One Hour Period · 37 lines
- All Ancestors of a Node in a Directed Acyclic Graph · 23 lines
- All Divisions With the Highest Score of a Binary Array · 25 lines
- All Elements in Two Binary Search Trees · 18 lines
- All Nodes Distance K in Binary Tree · 85 lines
- Allocate Mailboxes · 28 lines
- All O`one Data Structure · 43 lines
- All Paths From Source to Target · 26 lines
- All Possible Full Binary Trees · 35 lines
- Alphabet Board Path · 35 lines
- Ambiguous Coordinates · 47 lines
- Angle Between Hands of a Clock · 10 lines
- A Number After a Double Reversal · 6 lines
- Append K Integers With Minimal Sum · 56 lines
- Apply Discount Every n Orders · 32 lines
- Apply Discount to Prices · 31 lines
- Arithmetic Slices · 19 lines
- Arithmetic Slices II - Subsequence · 18 lines
- Arithmetic Subarrays · 52 lines
- Arranging Coins · 20 lines
- Array Nesting · 18 lines
- Array of Doubled Pairs · 53 lines
- Array Partition · 11 lines
- Array With Elements Not Equal to Average of Neighbors · 39 lines
- As Far from Land as Possible · 42 lines
- Assign Cookies · 20 lines
- Asteroid Collision · 46 lines
- Available Captures for Rook · 45 lines
- Average of Levels in Binary Tree · 20 lines
- Average Salary Excluding the Minimum and Maximum Salary · 12 lines
- Avoid Flood in The City · 30 lines
- Backspace String Compare · 40 lines
- Bag of Tokens · 19 lines
- Balance a Binary Search Tree · 27 lines
- Balanced Binary Tree · 26 lines
- Base 7 · 28 lines
- Baseball Game · 28 lines
- Basic Calculator · 39 lines
- Basic Calculator II · 64 lines
- Battleships in a Board · 101 lines
- Beautiful Arrangement · 34 lines
- Beautiful Arrangement II · 34 lines
- Beautiful Array · 25 lines
- Best Poker Hand · 17 lines
- Best Position for a Service Centre · 51 lines
- Best Sightseeing Pair · 13 lines
- Best Team With No Conflicts · 25 lines
- Best Time to Buy and Sell Stock · 19 lines
- Best Time to Buy and Sell Stock II · 15 lines
- Best Time to Buy and Sell Stock III · 27 lines
- Best Time to Buy and Sell Stock IV · 17 lines
- Best Time to Buy and Sell Stock with Cooldown · 17 lines
- Best Time to Buy and Sell Stock with Transaction Fee · 14 lines
- Binary Gap · 24 lines
- Binary Number with Alternating Bits · 7 lines
- Binary Prefix Divisible By 5 · 24 lines
- Binary Search · 14 lines
- Binary Search Tree Iterator · 36 lines
- Binary Search Tree to Greater Sum Tree · 21 lines
- Binary String With Substrings Representing 1 To N · 16 lines
- Binary Subarrays With Sum · 31 lines
- Binary Tree Cameras · 54 lines
- Binary Tree Coloring Game · 47 lines
- Binary Tree Inorder Traversal · 18 lines
- Binary Tree Level Order Traversal · 31 lines
- Binary Tree Level Order Traversal II · 24 lines
- Binary Tree Maximum Path Sum · 21 lines
- Binary Tree Paths · 26 lines
- Binary Tree Postorder Traversal · 15 lines
- Binary Tree Preorder Traversal · 15 lines
- Binary Tree Pruning · 10 lines
- Binary Tree Right Side View · 37 lines
- Binary Trees With Factors · 30 lines
- Binary Tree Tilt · 47 lines
- Binary Tree Zigzag Level Order Traversal · 31 lines
- Binary Watch · 91 lines
- Bitwise AND of Numbers Range · 16 lines
- Bitwise ORs of Subarrays · 15 lines
- Boats to Save People · 28 lines
- Booking Concert Tickets in Groups · 156 lines
- Brace Expansion II · 69 lines
- Break a Palindrome · 26 lines
- Bricks Falling When Hit · 95 lines
- Brick Wall · 31 lines
- Broken Calculator · 15 lines
- Buddy Strings · 37 lines
- Build an Array With Stack Operations · 21 lines
- Build Array from Permutation · 11 lines
- Build Array Where You Can Find The Maximum Exactly K Comparisons · 17 lines
- Building Boxes · 41 lines
- Bulb Switcher · 6 lines
- Bulb Switcher II · 11 lines
- Bulls and Cows · 21 lines
- Burst Balloons · 42 lines
- Bus Routes · 46 lines
- Calculate Amount Paid in Taxes · 17 lines
- Calculate Digit Sum of a String · 24 lines
- Calculate Money in Leetcode Bank · 11 lines
- Camelcase Matching · 32 lines
- Can Convert String in K Moves · 20 lines
- Candy · 15 lines
- Can I Win · 30 lines
- Can Make Arithmetic Progression From Sequence · 13 lines
- Can Make Palindrome from Substring · 29 lines
- Can Place Flowers · 17 lines
- Can You Eat Your Favorite Candy on Your Favorite Day? · 30 lines
- Capacity To Ship Packages Within D Days · 66 lines
- Capitalize the Title · 27 lines
- Card Flipping Game · 20 lines
- Car Fleet · 32 lines
- Car Fleet II · 26 lines
- Car Pooling · 21 lines
- Cat and Mouse · 99 lines
- Cat and Mouse II · 82 lines
- Cells in a Range on an Excel Sheet · 16 lines
- Cells with Odd Values in a Matrix · 26 lines
- Chalkboard XOR Game · 8 lines
- Champagne Tower · 28 lines
- Change Minimum Characters to Satisfy One of Three Conditions · 25 lines
- Cheapest Flights Within K Stops · 28 lines
- Check Array Formation Through Concatenation · 13 lines
- Check Completeness of a Binary Tree · 30 lines
- Check If All 1's Are at Least Length K Places Away · 19 lines
- Check if All A's Appears Before All B's · 11 lines
- Check if All Characters Have Equal Number of Occurrences · 11 lines
- Check if All the Integers in a Range Are Covered · 24 lines
- Check if an Original String Exists Given Two Encoded Strings · 46 lines
- Check if a Parentheses String Can Be Valid · 52 lines
- Check if Array Is Sorted and Rotated · 10 lines
- Check If Array Pairs Are Divisible by k · 22 lines
- Check If a String Can Break Another String · 28 lines
- Check If a String Contains All Binary Codes of Size K · 32 lines
- Check If a Word Occurs As a Prefix of Any Word in a Sentence · 13 lines
- Check if Binary String Has at Most One Segment of Ones · 11 lines
- Check if Every Row and Column Contains All Numbers · 22 lines
- Check If It Is a Good Array · 10 lines
- Check If It Is a Straight Line · 13 lines
- Check if Matrix Is X-Matrix · 16 lines
- Check if Move is Legal · 25 lines
- Check If N and Its Double Exist · 28 lines
- Check if Number Has Equal Digit Count and Digit Value · 23 lines
- Check if Number is a Sum of Powers of Three · 11 lines
- Check if Numbers Are Ascending in a Sentence · 21 lines
- Check if One String Swap Can Make Strings Equal · 31 lines
- Check If String Is a Prefix of Array · 16 lines
- Check If String Is Transformable With Substring Sort Operations · 23 lines
- Check if There Is a Valid Parentheses String Path · 37 lines
- Check if There is a Valid Partition For The Array · 22 lines
- Check if There is a Valid Path in a Grid · 57 lines
- Check if the Sentence Is Pangram · 10 lines
- Check If Two String Arrays are Equivalent · 35 lines
- Check if Word Can Be Placed In Crossword · 37 lines
- Check if Word Equals Summation of Two Words · 13 lines
- Check If Word Is Valid After Substitutions · 23 lines
- Checking Existence of Edge Length Limited Paths · 53 lines
- Check Whether Two Strings are Almost Equivalent · 18 lines
- Cherry Pickup · 61 lines
- Cherry Pickup II · 41 lines
- Cinema Seat Allocation · 46 lines
- Circle and Rectangle Overlapping · 12 lines
- Circular Array Loop · 36 lines
- Circular Permutation in Binary Representation · 50 lines
- Climbing Stairs · 13 lines
- Clone Graph · 27 lines
- Closest Dessert Cost · 70 lines
- Closest Divisors · 16 lines
- Closest Room · 23 lines
- Closest Subsequence Sum · 54 lines
- Clumsy Factorial · 26 lines
- Coin Change · 1 lines
- Coin Change 2 · 18 lines
- Coloring A Border · 53 lines
- Combinations · 23 lines
- Combination Sum · 30 lines
- Combination Sum II · 25 lines
- Combination Sum III · 31 lines
- Combination Sum IV · 15 lines
- Compare Strings by Frequency of the Smallest Character · 25 lines
- Compare Version Numbers · 42 lines
- Complement of Base 10 Integer · 10 lines
- Complete Binary Tree Inserter · 56 lines
- Complex Number Multiplication · 19 lines
- Concatenated Words · 25 lines
- Concatenation of Array · 10 lines
- Concatenation of Consecutive Binary Numbers · 16 lines
- Consecutive Characters · 13 lines
- Consecutive Numbers Sum · 12 lines
- Constrained Subsequence Sum · 17 lines
- Construct Binary Search Tree from Preorder Traversal · 26 lines
- Construct Binary Tree from Inorder and Postorder Traversal · 20 lines
- Construct Binary Tree from Preorder and Inorder Traversal · 38 lines
- Construct Binary Tree from Preorder and Postorder Traversal · 47 lines
- Construct K Palindrome Strings · 15 lines
- Construct Quad Tree · 46 lines
- Construct String from Binary Tree · 26 lines
- Construct Target Array With Multiple Sums · 41 lines
- Construct the Lexicographically Largest Valid Sequence · 39 lines
- Construct the Rectangle · 11 lines
- Container With Most Water · 32 lines
- Contains Duplicate · 11 lines
- Contains Duplicate II · 11 lines
- Contains Duplicate III · 29 lines
- Contiguous Array · 19 lines
- Continuous Subarray Sum · 17 lines
- Convert 1D Array Into 2D Array · 12 lines
- Convert a Number to Hexadecimal · 16 lines
- Convert Binary Number in a Linked List to Integer · 19 lines
- Convert BST to Greater Tree · 14 lines
- Convert Integer to the Sum of Two No-Zero Integers · 18 lines
- Convert Sorted Array to Binary Search Tree · 26 lines
- Convert Sorted List to Binary Search Tree · 20 lines
- Convert to Base -2 · 17 lines
- Coordinate With Maximum Network Quality · 33 lines
- Copy List with Random Pointer · 40 lines
- Corporate Flight Bookings · 15 lines
- Count All Possible Routes · 19 lines
- Count All Valid Pickup and Delivery Options · 13 lines
- Count and Say · 27 lines
- Count Array Pairs Divisible by K · 16 lines
- Count Artifacts That Can Be Extracted · 32 lines
- Count Asterisks · 22 lines
- Count Binary Substrings · 21 lines
- Count Common Words With One Occurrence · 12 lines
- Count Complete Tree Nodes · 11 lines
- Count Different Palindromic Subsequences · 30 lines
- Count Elements With Strictly Smaller and Greater Elements · 12 lines
- Count Equal and Divisible Pairs in an Array · 13 lines
- Count Fertile Pyramids in a Land · 30 lines
- Count Good Meals · 18 lines
- Count Good Nodes in Binary Tree · 21 lines
- Count Good Numbers · 38 lines
- Count Good Triplets · 15 lines
- Count Good Triplets in an Array · 36 lines
- Count Hills and Valleys in an Array · 22 lines
- Counting Bits · 21 lines
- Counting Words With a Given Prefix · 18 lines
- Count Integers in Intervals · 32 lines
- Count Integers With Even Digit Sum · 11 lines
- Count Items Matching a Rule · 16 lines
- Count Largest Group · 32 lines
- Count Lattice Points Inside a Circle · 22 lines
- Count Negative Numbers in a Sorted Matrix · 10 lines
- Count Nice Pairs in an Array · 34 lines
- Count Nodes Equal to Average of Subtree · 16 lines
- Count Nodes With the Highest Score · 60 lines
- Count Number of Bad Pairs · 22 lines
- Count Number of Homogenous Substrings · 15 lines
- Count Number of Maximum Bitwise-OR Subsets · 29 lines
- Count Number of Nice Subarrays · 26 lines
- Count Number of Pairs With Absolute Difference K · 14 lines
- Count Number of Rectangles Containing Each Point · 25 lines
- Count Number of Special Subsequences · 16 lines
- Count Number of Teams · 25 lines
- Count Number of Texts · 18 lines
- Count Number of Ways to Place Houses · 15 lines
- Count Numbers with Unique Digits · 45 lines
- Count Odd Numbers in an Interval Range · 10 lines
- Count of Matches in Tournament · 18 lines
- Count of Range Sum · 70 lines
- Count of Smaller Numbers After Self · 40 lines
- Count Operations to Obtain Zero · 11 lines
- Count Pairs Of Nodes · 61 lines
- Count Pairs With XOR in a Range · 79 lines
- Count Prefixes of a Given String · 16 lines
- Count Primes · 19 lines
- Count Servers that Communicate · 29 lines
- Count Sorted Vowel Strings · 35 lines
- Count Special Quadruplets · 22 lines
- Count Square Submatrices with All Ones · 42 lines
- Count Square Sum Triples · 16 lines
- Count Subarrays With Score Less Than K · 36 lines
- Count Sub Islands · 52 lines
- Count Submatrices With All Ones · 29 lines
- Count Substrings That Differ by One Character · 23 lines
- Count Subtrees With Max Distance Between Cities · 54 lines
- Count the Hidden Sequences · 20 lines
- Count the Number of Consistent Strings · 20 lines
- Count the Number of Ideal Arrays · 21 lines
- Count The Repetitions · 36 lines
- Count Triplets That Can Form Two Arrays of Equal XOR · 49 lines
- Count Unguarded Cells in the Grid · 48 lines
- Count Unhappy Friends · 30 lines
- Count Unique Characters of All Substrings of a Given String · 30 lines
- Count Unreachable Pairs of Nodes in an Undirected Graph · 29 lines
- Count Vowels Permutation · 19 lines
- Count Vowel Substrings of a String · 32 lines
- Count Ways to Build Rooms in an Ant Colony · 35 lines
- Count Ways to Make Array With Product · 48 lines
- Count Words Obtained After Adding a Letter · 37 lines
- Couples Holding Hands · 26 lines
- Course Schedule · 28 lines
- Course Schedule II · 29 lines
- Course Schedule III · 22 lines
- Course Schedule IV · 44 lines
- Cousins in Binary Tree · 42 lines
- Cracking the Safe · 32 lines
- Crawler Log Folder · 52 lines
- Create Binary Tree From Descriptions · 30 lines
- Create Maximum Number · 55 lines
- Create Sorted Array through Instructions · 79 lines
- Create Target Array in the Given Order · 12 lines
- Critical Connections in a Network · 32 lines
- Custom Sort String · 24 lines
- Cut Off Trees for Golf Event · 96 lines
- Cyclically Rotating a Grid · 70 lines
- Daily Temperatures · 16 lines
- Data Stream as Disjoint Intervals · 32 lines
- Day of the Week · 32 lines
- Day of the Year · 39 lines
- Decoded String at Index · 33 lines
- Decode String · 40 lines
- Decode the Message · 29 lines
- Decode the Slanted Ciphertext · 43 lines
- Decode Ways · 43 lines
- Decode Ways II · 64 lines
- Decode XORed Array · 8 lines
- Decode XORed Permutation · 19 lines
- Decompress Run-Length Encoded List · 17 lines
- Decrease Elements To Make Array Zigzag · 34 lines
- Decrypt String from Alphabet to Integer Mapping · 17 lines
- Deepest Leaves Sum · 24 lines
- Defanging an IP Address · 15 lines
- Defuse the Bomb · 31 lines
- Degree of an Array · 19 lines
- Delete and Earn · 23 lines
- Delete Characters to Make Fancy String · 19 lines
- Delete Columns to Make Sorted · 17 lines
- Delete Columns to Make Sorted II · 42 lines
- Delete Columns to Make Sorted III · 23 lines
- Delete Duplicate Folders in System · 55 lines
- Delete Leaves With a Given Value · 28 lines
- Delete Node in a BST · 24 lines
- Delete Node in a Linked List · 20 lines
- Delete Nodes And Return Forest · 45 lines
- Delete Operation for Two Strings · 25 lines
- Delete the Middle Node of a Linked List · 21 lines
- Delivering Boxes from Storage to Ports · 61 lines
- Describe the Painting · 21 lines
- Design Add and Search Words Data Structure · 69 lines
- Design a Food Rating System · 22 lines
- Design an ATM Machine · 17 lines
- Design an Ordered Stream · 22 lines
- Design a Number Container System · 32 lines
- Design a Stack With Increment Operation · 37 lines
- Design a Text Editor · 63 lines
- Design Authentication Manager · 28 lines
- Design Bitset · 49 lines
- Design Browser History · 41 lines
- Design Circular Deque · 70 lines
- Design Circular Queue · 83 lines
- Design Front Middle Back Queue · 100 lines
- Design HashMap · 57 lines
- Design HashSet · 24 lines
- Design Linked List · 73 lines
- Design Movie Rental System · 107 lines
- Design Parking System · 12 lines
- Design Skiplist · 34 lines
- Design Twitter · 54 lines
- Design Underground System · 40 lines
- Destination City · 16 lines
- Destroying Asteroids · 15 lines
- Detect Capital · 41 lines
- Detect Cycles in 2D Grid · 32 lines
- Detect Pattern of Length M Repeated K or More Times · 22 lines
- Detect Squares · 42 lines
- Determine Color of a Chessboard Square · 6 lines
- Determine if String Halves Are Alike · 14 lines
- Determine if Two Strings Are Close · 23 lines
- Determine Whether Matrix Can Be Obtained By Rotation · 26 lines
- Detonate the Maximum Bombs · 47 lines
- Diagonal Traverse · 65 lines
- Diagonal Traverse II · 26 lines
- Diameter of Binary Tree · 19 lines
- Dice Roll Simulation · 25 lines
- Different Ways to Add Parentheses · 44 lines
- Dinner Plate Stacks · 45 lines
- Display Table of Food Orders in a Restaurant · 52 lines
- Distance Between Bus Stops · 25 lines
- Distant Barcodes · 54 lines
- Distinct Echo Substrings · 51 lines
- Distinct Subsequences · 19 lines
- Distinct Subsequences II · 23 lines
- Distribute Candies · 8 lines
- Distribute Candies to People · 22 lines
- Distribute Coins in Binary Tree · 28 lines
- Distribute Repeating Integers · 25 lines
- DI String Match · 14 lines
- Divide Array in Sets of K Consecutive Numbers · 29 lines
- Divide a String Into Groups of Size k · 22 lines
- Divide Two Integers · 20 lines
- Divisor Game · 7 lines
- Domino and Tromino Tiling · 14 lines
- Dota2 Senate · 30 lines
- Dungeon Game · 35 lines
- Duplicate Zeros · 12 lines
- Earliest Possible Day of Full Bloom · 20 lines
- Edit Distance · 23 lines
- Egg Drop With 2 Eggs and N Floors · 30 lines
- Element Appearing More Than 25% In Sorted Array · 17 lines
- Eliminate Maximum Number of Monsters · 12 lines
- Elimination Game · 16 lines
- Employee Importance · 21 lines
- Encode and Decode TinyURL · 33 lines
- Encrypt and Decrypt Strings · 38 lines
- Equal Rational Numbers · 70 lines
- Equal Row and Column Pairs · 20 lines
- Equal Sum Arrays With Minimum Number of Operations · 62 lines
- Erect the Fence · 50 lines
- Escape a Large Maze · 38 lines
- Escape The Ghosts · 14 lines
- Escape the Spreading Fire · 110 lines
- Evaluate Boolean Binary Tree · 8 lines
- Evaluate Division · 62 lines
- Evaluate Reverse Polish Notation · 57 lines
- Evaluate the Bracket Pairs of a String · 34 lines
- Even Odd Tree · 37 lines
- Exam Room · 59 lines
- Excel Sheet Column Number · 15 lines
- Excel Sheet Column Title · 12 lines
- Exclusive Time of Functions · 21 lines
- Execution of All Suffix Instructions Staying in a Grid · 40 lines
- Expression Add Operators · 36 lines
- Expressive Words · 57 lines
- Factorial Trailing Zeroes · 18 lines
- Fair Candy Swap · 42 lines
- Fair Distribution of Cookies · 27 lines
- Falling Squares · 24 lines
- Fancy Sequence · 43 lines
- Fibonacci Number · 7 lines
- Filling Bookcase Shelves · 30 lines
- Filter Restaurants by Vegan-Friendly, Price and Distance · 35 lines
- Final Prices With a Special Discount in a Shop · 16 lines
- Final Value of Variable After Performing Operations · 11 lines
- Find a Corresponding Node of a Binary Tree in a Clone of That Tree · 12 lines
- Find All Anagrams in a String · 33 lines
- Find All Duplicates in an Array · 14 lines
- Find All Good Strings · 78 lines
- Find All Groups of Farmland · 40 lines
- Find All K-Distant Indices in an Array · 16 lines
- Find All Lonely Numbers in the Array · 17 lines
- Find All Numbers Disappeared in an Array · 16 lines
- Find All People With Secret · 55 lines
- Find All Possible Recipes from Given Supplies · 42 lines
- Find And Replace in String · 21 lines
- Find and Replace Pattern · 51 lines
- Find a Peak Element II · 33 lines
- Find Array Given Subset Sums · 31 lines
- Find a Value of a Mysterious Function Closest to Target · 15 lines
- Find Bottom Left Tree Value · 22 lines
- Find Center of Star Graph · 23 lines
- Find Closest Node to Given Two Nodes · 44 lines
- Find Closest Number to Zero · 17 lines
- Find Common Characters · 26 lines
- Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree · 105 lines
- Find Duplicate File in System · 45 lines
- Find Duplicate Subtrees · 23 lines
- Find Elements in a Contaminated Binary Tree · 36 lines
- Find Eventual Safe States · 31 lines
- Find First and Last Position of Element in Sorted Array · 58 lines
- Find First Palindromic String in the Array · 20 lines
- Find Good Days to Rob the Bank · 30 lines
- Find Greatest Common Divisor of Array · 17 lines
- Find if Path Exists in Graph · 27 lines
- Finding 3-Digit Even Numbers · 24 lines
- Finding MK Average · 118 lines
- Finding Pairs With a Certain Sum · 57 lines
- Finding the Users Active Minutes · 14 lines
- Find in Mountain Array · 97 lines
- Find K Closest Elements · 25 lines
- Find K Pairs with Smallest Sums · 30 lines
- Find Kth Bit in Nth Binary String · 32 lines
- Find Kth Largest XOR Coordinate Value · 38 lines
- Find K-th Smallest Pair Distance · 31 lines
- Find Largest Value in Each Tree Row · 26 lines
- Find Latest Group of Size M · 18 lines
- Find Longest Awesome Substring · 29 lines
- Find Lucky Integer in an Array · 24 lines
- Find Median from Data Stream · 20 lines
- Find Minimum in Rotated Sorted Array · 21 lines
- Find Minimum in Rotated Sorted Array II · 16 lines
- Find Minimum Time to Finish All Jobs · 32 lines
- Find Missing Observations · 12 lines
- Find Mode in Binary Search Tree · 28 lines
- Find Nearest Point That Has the Same X or Y Coordinate · 18 lines
- Find Numbers with Even Number of Digits · 18 lines
- Find N Unique Integers Sum up to Zero · 12 lines
- Find Original Array From Doubled Array · 23 lines
- Find Palindrome With Fixed Length · 26 lines
- Find Peak Element · 10 lines
- Find Pivot Index · 16 lines
- Find Players With Zero or One Losses · 27 lines
- Find Positive Integer Solution for a Given Equation · 41 lines
- Find Resultant Array After Removing Anagrams · 16 lines
- Find Right Interval · 17 lines
- Find Servers That Handled Most Number of Requests · 49 lines
- Find Smallest Letter Greater Than Target · 30 lines
- Find Subsequence of Length K With the Largest Sum · 20 lines
- Find Substring With Given Hash Value · 38 lines
- Find Target Indices After Sorting Array · 11 lines
- Find the City With the Smallest Number of Neighbors at a Threshold Distance · 42 lines
- Find the Closest Palindrome · 30 lines
- Find the Difference · 9 lines
- Find the Difference of Two Arrays · 19 lines
- Find the Distance Value Between Two Arrays · 19 lines
- Find the Duplicate Number · 24 lines
- Find the Highest Altitude · 14 lines
- Find the K-Beauty of a Number · 29 lines
- Find the Kth Largest Integer in the Array · 14 lines
- Find the Kth Smallest Sum of a Matrix With Sorted Rows · 33 lines
- Find the Longest Substring Containing Vowels in Even Counts · 20 lines
- Find the Longest Valid Obstacle Course at Each Position · 57 lines
- Find the Middle Index in Array · 19 lines
- Find the Minimum and Maximum Number of Nodes Between Critical Points · 25 lines
- Find the Minimum Number of Fibonacci Numbers Whose Sum Is K · 30 lines
- Find the Most Competitive Subsequence · 15 lines
- Find the Shortest Superstring · 101 lines
- Find the Smallest Divisor Given a Threshold · 22 lines
- Find the Student that Will Replace the Chalk · 28 lines
- Find the Town Judge · 14 lines
- Find the Winner of an Array Game · 17 lines
- Find the Winner of the Circular Game · 17 lines
- Find Three Consecutive Integers That Sum to a Given Number · 23 lines
- Find Triangular Sum of an Array · 12 lines
- Find Two Non-overlapping Sub-arrays Each With Target Sum · 43 lines
- Find Unique Binary String · 12 lines
- Find Valid Matrix Given Row and Column Sums · 23 lines
- Find Winner on a Tic Tac Toe Game · 32 lines
- Find Words That Can Be Formed by Characters · 31 lines
- Find XOR Sum of All Pairs Bitwise AND · 20 lines
- First Bad Version · 15 lines
- First Day Where You Have Been in All the Rooms · 17 lines
- First Letter to Appear Twice · 17 lines
- First Missing Positive · 24 lines
- First Unique Character in a String · 18 lines
- Fizz Buzz · 20 lines
- Flatten a Multilevel Doubly Linked List · 29 lines
- Flatten Binary Tree to Linked List · 15 lines
- Flatten Nested List Iterator · 30 lines
- Flip Binary Tree To Match Preorder Traversal · 36 lines
- Flip Columns For Maximum Number of Equal Rows · 17 lines
- Flip Equivalent Binary Trees · 21 lines
- Flipping an Image · 22 lines
- Flip String to Monotone Increasing · 44 lines
- Flood Fill · 25 lines
- Flower Planting With No Adjacent · 38 lines
- Form Array by Concatenating Subarrays of Another Array · 45 lines
- Form Largest Integer With Digits That Add up to Target · 24 lines
- Four Divisors · 31 lines
- Fraction Addition and Subtraction · 57 lines
- Fraction to Recurring Decimal · 31 lines
- Freedom Trail · 21 lines
- Frequency of the Most Frequent Element · 31 lines
- Friends Of Appropriate Ages · 14 lines
- Frog Jump · 45 lines
- Frog Position After T Seconds · 60 lines
- Fruit Into Baskets · 29 lines
- Furthest Building You Can Reach · 40 lines
- Game of Life · 70 lines
- Gas Station · 23 lines
- GCD Sort of an Array · 73 lines
- Generate a String With Characters That Have Odd Counts · 13 lines
- Generate Parentheses · 29 lines
- Generate Random Point in a Circle · 25 lines
- Get Biggest Three Rhombus Sums in a Grid · 31 lines
- Get Equal Substrings Within Budget · 20 lines
- Get Maximum in Generated Array · 20 lines
- Get the Maximum Score · 26 lines
- Get Watched Videos by Your Friends · 45 lines
- Global and Local Inversions · 19 lines
- Goal Parser Interpretation · 20 lines
- Goat Latin · 31 lines
- Graph Connectivity With Threshold · 62 lines
- Gray Code · 17 lines
- Greatest Common Divisor of Strings · 10 lines
- Greatest English Letter in Upper and Lower Case · 26 lines
- Greatest Sum Divisible by Three · 26 lines
- Grid Game · 20 lines
- Grid Illumination · 57 lines
- Group Anagrams · 21 lines
- Groups of Special-Equivalent Strings · 24 lines
- Groups of Strings · 65 lines
- Group the People Given the Group Size They Belong To · 20 lines
- Grumpy Bookstore Owner · 52 lines
- Guess Number Higher or Lower · 25 lines
- Guess Number Higher or Lower II · 28 lines
- Hamming Distance · 12 lines
- Hand of Straights · 23 lines
- Happy Number · 31 lines
- Heaters · 25 lines
- Height Checker · 12 lines
- H-Index · 11 lines
- H-Index II · 19 lines
- House Robber · 15 lines
- House Robber II · 57 lines
- House Robber III · 17 lines
- How Many Numbers Are Smaller Than the Current Number · 16 lines
- HTML Entity Parser · 29 lines
- Image Overlap · 27 lines
- Image Smoother · 22 lines
- Implement Magic Dictionary · 48 lines
- Implement Queue using Stacks · 53 lines
- Implement Rand10() Using Rand7() · 13 lines
- Implement Stack using Queues · 33 lines
- Implement strStr() · 6 lines
- Implement Trie (Prefix Tree) · 74 lines
- Increasing Decreasing String · 28 lines
- Increasing Order Search Tree · 38 lines
- Increasing Subsequences · 23 lines
- Increasing Triplet Subsequence · 19 lines
- Incremental Memory Leak · 15 lines
- Insert Delete GetRandom O(1) · 28 lines
- Insert Delete GetRandom O(1) - Duplicates allowed · 60 lines
- Insert Interval · 27 lines
- Insert into a Binary Search Tree · 25 lines
- Insertion Sort List · 28 lines
- Insufficient Nodes in Root to Leaf Paths · 28 lines
- Integer Break · 18 lines
- Integer Replacement · 14 lines
- Integer to English Words · 64 lines
- Integer to Roman · 59 lines
- Interleaving String · 31 lines
- Intersection of Multiple Arrays · 25 lines
- Intersection of Two Arrays · 36 lines
- Intersection of Two Arrays II · 27 lines
- Intersection of Two Linked Lists · 81 lines
- Interval List Intersections · 23 lines
- Intervals Between Identical Elements · 30 lines
- Invalid Transactions · 75 lines
- Invert Binary Tree · 12 lines
- IPO · 26 lines
- Is Graph Bipartite? · 22 lines
- Island Perimeter · 18 lines
- Isomorphic Strings · 18 lines
- Is Subsequence · 19 lines
- Iterator for Combination · 32 lines
- Jewels and Stones · 16 lines
- Jump Game · 12 lines
- Jump Game II · 23 lines
- Jump Game III · 14 lines
- Jump Game IV · 44 lines
- Jump Game V · 37 lines
- Jump Game VI · 19 lines
- Jump Game VII · 24 lines
- K Closest Points to Origin · 22 lines
- K-Concatenation Maximum Sum · 52 lines
- K-diff Pairs in an Array · 16 lines
- K Divisible Elements Subarrays · 20 lines
- Keep Multiplying Found Values by Two · 20 lines
- Keyboard Row · 56 lines
- Keys and Rooms · 17 lines
- K Highest Ranked Items Within a Price Range · 71 lines
- Kids With the Greatest Number of Candies · 18 lines
- K Inverse Pairs Array · 19 lines
- Knight Dialer · 30 lines
- Knight Probability in Chessboard · 53 lines
- Koko Eating Bananas · 26 lines
- K Radius Subarray Averages · 28 lines
- K-Similar Strings · 21 lines
- Kth Ancestor of a Tree Node · 27 lines
- Kth Distinct String in an Array · 18 lines
- Kth Largest Element in an Array · 15 lines
- Kth Largest Element in a Stream · 23 lines
- Kth Missing Positive Number · 16 lines
- Kth Smallest Element in a BST · 15 lines
- Kth Smallest Element in a Sorted Matrix · 18 lines
- K-th Smallest in Lexicographical Order · 85 lines
- Kth Smallest Instructions · 45 lines
- Kth Smallest Number in Multiplication Table · 24 lines
- K-th Smallest Prime Fraction · 20 lines
- Kth Smallest Product of Two Sorted Arrays · 62 lines
- K-th Symbol in Grammar · 20 lines
- Largest 1-Bordered Square · 52 lines
- Largest 3-Same-Digit Number in String · 15 lines
- Largest Color Value in a Directed Graph · 45 lines
- Largest Combination With Bitwise AND Greater Than Zero · 20 lines
- Largest Component Size by Common Factor · 70 lines
- Largest Divisible Subset · 37 lines
- Largest Magic Square · 82 lines
- Largest Merge Of Two Strings · 23 lines
- Largest Multiple of Three · 77 lines
- Largest Number · 17 lines
- Largest Number After Digit Swaps by Parity · 32 lines
- Largest Number After Mutating Substring · 21 lines
- Largest Number At Least Twice of Others · 21 lines
- Largest Odd Number in String · 32 lines
- Largest Palindrome Product · 24 lines
- Largest Perimeter Triangle · 16 lines
- Largest Plus Sign · 56 lines
- Largest Rectangle in Histogram · 60 lines
- Largest Submatrix With Rearrangements · 25 lines
- Largest Substring Between Two Equal Characters · 16 lines
- Largest Sum of Averages · 25 lines
- Largest Time for Given Digits · 54 lines
- Largest Triangle Area · 18 lines
- Largest Values From Labels · 31 lines
- Last Day Where You Can Still Cross · 51 lines
- Last Moment Before All Ants Fall Out of a Plank · 9 lines
- Last Stone Weight · 11 lines
- Last Stone Weight II · 35 lines
- Last Substring in Lexicographical Order · 25 lines
- Latest Time by Replacing Hidden Digits · 21 lines
- Leaf-Similar Trees · 19 lines
- Least Number of Unique Integers after K Removals · 28 lines
- Least Operators to Express Number · 39 lines
- Lemonade Change · 36 lines
- Length of Last Word · 20 lines
- Length of Longest Fibonacci Subsequence · 40 lines
- Letter Case Permutation · 20 lines
- Letter Combinations of a Phone Number · 38 lines
- Letter Tile Possibilities · 30 lines
- Lexicographically Smallest String After Applying Operations · 25 lines
- Lexicographical Numbers · 15 lines
- LFU Cache · 88 lines
- License Key Formatting · 24 lines
- Linked List Components · 16 lines
- Linked List Cycle · 25 lines
- Linked List Cycle II · 16 lines
- Linked List in Binary Tree · 15 lines
- Linked List Random Node · 30 lines
- Logical OR of Two Binary Grids Represented as Quad-Trees · 37 lines
- Longer Contiguous Segments of Ones than Zeros · 29 lines
- Longest Absolute File Path · 40 lines
- Longest Arithmetic Subsequence · 14 lines
- Longest Arithmetic Subsequence of Given Difference · 25 lines
- Longest Binary Subsequence Less Than or Equal to K · 23 lines
- Longest Chunked Palindrome Decomposition · 27 lines
- Longest Common Prefix · 19 lines
- Longest Common Subpath · 71 lines
- Longest Common Subsequence · 13 lines
- Longest Consecutive Sequence · 24 lines
- Longest Continuous Increasing Subsequence · 23 lines
- Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit · 27 lines
- Longest Cycle in a Graph · 27 lines
- Longest Duplicate Substring · 48 lines
- Longest Happy Prefix · 25 lines
- Longest Happy String · 43 lines
- Longest Harmonious Subsequence · 20 lines
- Longest Ideal Subsequence · 18 lines
- Longest Increasing Path in a Matrix · 63 lines
- Longest Increasing Subsequence · 15 lines
- Longest Mountain in Array · 34 lines
- Longest Nice Substring · 30 lines
- Longest Palindrome · 18 lines
- Longest Palindrome by Concatenating Two Letter Words · 28 lines
- Longest Palindromic Subsequence · 22 lines
- Longest Palindromic Substring · 30 lines
- Longest Path With Different Adjacent Characters · 42 lines
- Longest Repeating Character Replacement · 24 lines
- Longest String Chain · 28 lines
- Longest Subarray of 1's After Deleting One Element · 20 lines
- Longest Subsequence Repeated k Times · 39 lines
- Longest Substring Of All Vowels in Order · 26 lines
- Longest Substring of One Repeating Character · 75 lines
- Longest Substring with At Least K Repeating Characters · 63 lines
- Longest Substring Without Repeating Characters · 15 lines
- Longest Turbulent Subarray · 27 lines
- Longest Uncommon Subsequence I · 12 lines
- Longest Uncommon Subsequence II · 35 lines
- Longest Univalue Path · 50 lines
- Longest Valid Parentheses · 32 lines
- Longest Well-Performing Interval · 22 lines
- Longest Word in Dictionary · 44 lines
- Longest Word in Dictionary through Deleting · 31 lines
- Longest ZigZag Path in a Binary Tree · 17 lines
- Long Pressed Name · 15 lines
- Loud and Rich · 33 lines
- Lowest Common Ancestor of a Binary Search Tree · 10 lines
- Lowest Common Ancestor of a Binary Tree · 18 lines
- Lowest Common Ancestor of Deepest Leaves · 22 lines
- LRU Cache · 65 lines
- Lucky Numbers in a Matrix · 32 lines
- Magical String · 24 lines
- Magic Squares In Grid · 37 lines
- Magnetic Force Between Two Balls · 31 lines
- Majority Element · 26 lines
- Majority Element II · 42 lines
- Make Array Strictly Increasing · 101 lines
- Make Array Zero by Subtracting Equal Amounts · 25 lines
- Make Sum Divisible by P · 22 lines
- Make The String Great · 28 lines
- Make the XOR of All Segments Equal to Zero · 42 lines
- Make Two Arrays Equal by Reversing Sub-arrays · 17 lines
- Making A Large Island · 43 lines
- Making File Names Unique · 64 lines
- Map of Highest Peak · 61 lines
- Map Sum Pairs · 21 lines
- Masking Personal Information · 25 lines
- Matchsticks to Square · 43 lines
- Match Substring After Replacement · 21 lines
- Matrix Block Sum · 31 lines
- Matrix Cells in Distance Order · 17 lines
- Matrix Diagonal Sum · 15 lines
- Max Area of Island · 22 lines
- Max Chunks To Make Sorted · 20 lines
- Max Chunks To Make Sorted II · 18 lines
- Max Consecutive Ones · 19 lines
- Max Consecutive Ones III · 21 lines
- Max Difference You Can Get From Changing an Integer · 69 lines
- Max Dot Product of Two Subsequences · 28 lines
- Maximal Network Rank · 25 lines
- Maximal Rectangle · 89 lines
- Maximal Square · 27 lines
- Maximize Distance to Closest Person · 20 lines
- Maximize Grid Happiness · 72 lines
- Maximize Number of Nice Divisors · 20 lines
- Maximize Number of Subsequences in a String · 35 lines
- Maximize Palindrome Length From Subsequences · 80 lines
- Maximize Score After N Operations · 33 lines
- Maximize Sum Of Array After K Negations · 19 lines
- Maximize the Confusion of an Exam · 23 lines
- Maximize the Topmost Element After K Moves · 17 lines
- Maximum 69 Number · 19 lines
- Maximum Absolute Sum of Any Subarray · 21 lines
- Maximum Alternating Subsequence Sum · 14 lines
- Maximum AND Sum of Array · 38 lines
- Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts · 25 lines
- Maximum Ascending Subarray Sum · 15 lines
- Maximum Average Pass Ratio · 28 lines
- Maximum Average Subarray I · 34 lines
- Maximum Bags With Full Capacity of Rocks · 16 lines
- Maximum Binary String After Change · 22 lines
- Maximum Binary Tree · 38 lines
- Maximum Binary Tree II · 43 lines
- Maximum Building Height · 22 lines
- Maximum Candies Allocated to K Children · 32 lines
- Maximum Candies You Can Get from Boxes · 36 lines
- Maximum Compatibility Score Sum · 36 lines
- Maximum Consecutive Floors Without Special Floors · 13 lines
- Maximum Depth of Binary Tree · 9 lines
- Maximum Depth of N-ary Tree · 20 lines
- Maximum Difference Between Increasing Elements · 11 lines
- Maximum Difference Between Node and Ancestor · 19 lines
- Maximum Distance Between a Pair of Values · 14 lines
- Maximum Earnings From Taxi · 37 lines
- Maximum Element After Decreasing and Rearranging · 14 lines
- Maximum Employees to Be Invited to a Meeting · 53 lines
- Maximum Equal Frequency · 29 lines
- Maximum Erasure Value · 27 lines
- Maximum Frequency Stack · 46 lines
- Maximum Fruits Harvested After at Most K Steps · 24 lines
- Maximum Gap · 19 lines
- Maximum Genetic Difference Query · 100 lines
- Maximum Good People Based on Statements · 51 lines
- Maximum Height by Stacking Cuboids · 24 lines
- Maximum Ice Cream Bars · 15 lines
- Maximum Length of a Concatenated String with Unique Characters · 47 lines
- Maximum Length of Pair Chain · 28 lines
- Maximum Length of Repeated Subarray · 45 lines
- Maximum Length of Subarray With Positive Product · 26 lines
- Maximum Level Sum of a Binary Tree · 30 lines
- Maximum Matrix Sum · 40 lines
- Maximum Nesting Depth of the Parentheses · 14 lines
- Maximum Nesting Depth of Two Valid Parentheses Strings · 39 lines
- Maximum Non Negative Product in a Matrix · 32 lines
- Maximum Number of Achievable Transfer Requests · 29 lines
- Maximum Number of Balloons · 23 lines
- Maximum Number of Balls in a Box · 17 lines
- Maximum Number of Coins You Can Get · 16 lines
- Maximum Number of Consecutive Values You Can Make · 13 lines
- Maximum Number of Eaten Apples · 27 lines
- Maximum Number of Events That Can Be Attended · 26 lines
- Maximum Number of Events That Can Be Attended II · 35 lines
- Maximum Number of Groups Getting Fresh Donuts · 40 lines
- Maximum Number of Non-Overlapping Subarrays With Sum Equals Target · 14 lines
- Maximum Number of Non-Overlapping Substrings · 62 lines
- Maximum Number of Occurrences of a Substring · 27 lines
- Maximum Number of Pairs in Array · 16 lines
- Maximum Number of Points with Cost · 25 lines
- Maximum Number of Removable Characters · 30 lines
- Maximum Number of Tasks You Can Assign · 32 lines
- Maximum Number of Visible Points · 25 lines
- Maximum Number of Vowels in a Substring of Given Length · 23 lines
- Maximum Number of Ways to Partition an Array · 48 lines
- Maximum Number of Weeks for Which You Can Work · 10 lines
- Maximum Number of Words Found in Sentences · 11 lines
- Maximum Number of Words You Can Type · 29 lines
- Maximum of Absolute Value Expression · 22 lines
- Maximum Path Quality of a Graph · 46 lines
- Maximum Performance of a Team · 21 lines
- Maximum Points in an Archery Competition · 35 lines
- Maximum Points You Can Obtain from Cards · 20 lines
- Maximum Population Year · 16 lines
- Maximum Product After K Increments · 21 lines
- Maximum Product Difference Between Two Pairs · 32 lines
- Maximum Product of Splitted Binary Tree · 27 lines
- Maximum Product of the Length of Two Palindromic Subsequences · 34 lines
- Maximum Product of the Length of Two Palindromic Substrings · 53 lines
- Maximum Product of Three Numbers · 34 lines
- Maximum Product of Two Elements in an Array · 8 lines
- Maximum Product of Word Lengths · 30 lines
- Maximum Product Subarray · 23 lines
- Maximum Profit in Job Scheduling · 45 lines
- Maximum Profit of Operating a Centennial Wheel · 41 lines
- Maximum Repeating Substring · 14 lines
- Maximum Running Time of N Computers · 39 lines
- Maximum Score After Splitting a String · 16 lines
- Maximum Score from Performing Multiplication Operations · 26 lines
- Maximum Score From Removing Stones · 6 lines
- Maximum Score From Removing Substrings · 34 lines
- Maximum Score of a Good Subarray · 18 lines
- Maximum Score of a Node Sequence · 31 lines
- Maximum Score Of Spliced Array · 29 lines
- Maximum Score Words Formed by Letters · 32 lines
- Maximum Side Length of a Square with Sum Less than or Equal to Threshold · 64 lines
- Maximum Split of Positive Even Integers · 62 lines
- Maximum Students Taking Exam · 35 lines
- Maximum Subarray · 12 lines
- Maximum Subarray Sum with One Deletion · 20 lines
- Maximum Sum BST in Binary Tree · 26 lines
- Maximum Sum Circular Subarray · 14 lines
- Maximum Sum Obtained of Any Permutation · 33 lines
- Maximum Sum of 3 Non-Overlapping Subarrays · 49 lines
- Maximum Sum of Two Non-Overlapping Subarrays · 31 lines
- Maximum Swap · 24 lines
- Maximum Total Beauty of the Gardens · 69 lines
- Maximum Total Importance of Roads · 23 lines
- Maximum Trailing Zeros in a Cornered Path · 34 lines
- Maximum Twin Sum of a Linked List · 42 lines
- Maximum Units on a Truck · 21 lines
- Maximum Value after Insertion · 33 lines
- Maximum Value at a Given Index in a Bounded Array · 32 lines
- Maximum Value of K Coins From Piles · 33 lines
- Maximum White Tiles Covered by a Carpet · 37 lines
- Maximum Width of Binary Tree · 27 lines
- Maximum Width Ramp · 24 lines
- Maximum XOR After Operations · 10 lines
- Maximum XOR for Each Query · 19 lines
- Maximum XOR of Two Numbers in an Array · 68 lines
- Maximum XOR With an Element From Array · 81 lines
- Max Increase to Keep City Skyline · 30 lines
- Max Number of K-Sum Pairs · 23 lines
- Max Points on a Line · 38 lines
- Max Sum of a Pair With Equal Sum of Digits · 15 lines
- Max Sum of Rectangle No Larger Than K · 77 lines
- Max Value of Equation · 20 lines
- Mean of Array After Removing Some Elements · 10 lines
- Median of Two Sorted Arrays · 39 lines
- Merge BSTs to Create Single BST · 87 lines
- Merge In Between Linked Lists · 29 lines
- Merge Intervals · 19 lines
- Merge k Sorted Lists · 24 lines
- Merge Similar Items · 14 lines
- Merge Sorted Array · 30 lines
- Merge Strings Alternately · 20 lines
- Merge Triplets to Form Target Triplet · 12 lines
- Merge Two Binary Trees · 23 lines
- Merge Two Sorted Lists · 21 lines
- Middle of the Linked List · 22 lines
- Min Cost Climbing Stairs · 17 lines
- Min Cost to Connect All Points · 28 lines
- Minesweeper · 37 lines
- Minimize Deviation in Array · 35 lines
- Minimized Maximum of Products Distributed to Any Store · 19 lines
- Minimize Hamming Distance After Swap Operations · 47 lines
- Minimize Malware Spread · 59 lines
- Minimize Malware Spread II · 43 lines
- Minimize Maximum Pair Sum in Array · 15 lines
- Minimize the Difference Between Target and Chosen Elements · 27 lines
- Minimum Absolute Difference · 19 lines
- Minimum Absolute Difference in BST · 16 lines
- Minimum Absolute Difference Queries · 61 lines
- Minimum Absolute Sum Difference · 30 lines
- Minimum Add to Make Parentheses Valid · 20 lines
- Minimum Adjacent Swaps to Reach the Kth Smallest Number · 34 lines
- Minimum Amount of Time to Fill Cups · 15 lines
- Minimum Area Rectangle · 25 lines
- Minimum Area Rectangle II · 25 lines
- Minimum ASCII Delete Sum for Two Strings · 35 lines
- Minimum Average Difference · 23 lines
- Minimum Bit Flips to Convert Number · 6 lines
- Minimum Changes To Make Alternating Binary String · 10 lines
- Minimum Consecutive Cards to Pick Up · 14 lines
- Minimum Cost For Tickets · 16 lines
- Minimum Cost Homecoming of a Robot in a Grid · 22 lines
- Minimum Cost of Buying Candies With Discount · 24 lines
- Minimum Cost to Change the Final Value of Expression · 66 lines
- Minimum Cost to Connect Two Groups of Points · 33 lines
- Minimum Cost to Cut a Stick · 21 lines
- Minimum Cost to Hire K Workers · 27 lines
- Minimum Cost to Make at Least One Valid Path in a Grid · 61 lines
- Minimum Cost to Merge Stones · 25 lines
- Minimum Cost to Move Chips to The Same Position · 13 lines
- Minimum Cost to Reach Destination in Time · 69 lines
- Minimum Cost Tree From Leaf Values · 22 lines
- Minimum Degree of a Connected Trio in a Graph · 27 lines
- Minimum Deletions to Make Array Beautiful · 13 lines
- Minimum Deletions to Make Array Divisible · 30 lines
- Minimum Deletions to Make Character Frequencies Unique · 32 lines
- Minimum Deletions to Make String Balanced · 21 lines
- Minimum Depth of Binary Tree · 21 lines
- Minimum Difference Between Highest and Lowest of K Scores · 9 lines
- Minimum Difference Between Largest and Smallest Value in Three Moves · 15 lines
- Minimum Difference in Sums After Removal of Elements · 39 lines
- Minimum Difficulty of a Job Schedule · 26 lines
- Minimum Distance Between BST Nodes · 16 lines
- Minimum Distance to the Target Element · 16 lines
- Minimum Distance to Type a Word Using Two Fingers · 43 lines
- Minimum Domino Rotations For Equal Row · 47 lines
- Minimum Elements to Add to Form a Given Sum · 17 lines
- Minimum Falling Path Sum · 49 lines
- Minimum Falling Path Sum II · 38 lines
- Minimum Flips to Make a OR b Equal to c · 36 lines
- Minimum Garden Perimeter to Collect Enough Apples · 13 lines
- Minimum Genetic Mutation · 38 lines
- Minimum Height Trees · 79 lines
- Minimum Incompatibility · 55 lines
- Minimum Increment to Make Array Unique · 15 lines
- Minimum Index Sum of Two Lists · 24 lines
- Minimum Initial Energy to Finish Tasks · 13 lines
- Minimum Insertion Steps to Make a String Palindrome · 25 lines
- Minimum Insertions to Balance a Parentheses String · 28 lines
- Minimum Interval to Include Each Query · 88 lines
- Minimum Jumps to Reach Home · 34 lines
- Minimum Length of String After Deleting Similar Ends · 27 lines
- Minimum Limit of Balls in a Bag · 31 lines
- Minimum Moves to Convert String · 18 lines
- Minimum Moves to Equal Array Elements · 13 lines
- Minimum Moves to Equal Array Elements II · 12 lines
- Minimum Moves to Make Array Complementary · 18 lines
- Minimum Moves to Move a Box to Their Target Location · 174 lines
- Minimum Moves to Reach Target Score · 17 lines
- Minimum Moves to Reach Target with Rotations · 85 lines
- Minimum Non-Zero Product of the Array Elements · 25 lines
- Minimum Number of Arrows to Burst Balloons · 21 lines
- Minimum Number of Buckets Required to Collect Rainwater from Houses · 23 lines
- Minimum Number of Days to Disconnect Island · 90 lines
- Minimum Number of Days to Eat N Oranges · 35 lines
- Minimum Number of Days to Make m Bouquets · 34 lines
- Minimum Number of Flips to Convert Binary Matrix to Zero Matrix · 44 lines
- Minimum Number of Flips to Make the Binary String Alternating · 24 lines
- Minimum Number of Frogs Croaking · 32 lines
- Minimum Number of Increments on Subarrays to Form a Target Array · 12 lines
- Minimum Number of K Consecutive Bit Flips · 37 lines
- Minimum Number of Moves to Make Palindrome · 46 lines
- Minimum Number of Moves to Seat Everyone · 12 lines
- Minimum Number of Operations to Convert Time · 19 lines
- Minimum Number of Operations to Make Array Continuous · 23 lines
- Minimum Number of Operations to Make String Sorted · 53 lines
- Minimum Number of Operations to Move All Balls to Each Box · 17 lines
- Minimum Number of Operations to Reinitialize a Permutation · 37 lines
- Minimum Number of People to Teach · 52 lines
- Minimum Number of Refueling Stops · 41 lines
- Minimum Number of Removals to Make Mountain Array · 34 lines
- Minimum Number of Steps to Make Two Strings Anagram · 15 lines
- Minimum Number of Swaps to Make the Binary String Alternating · 19 lines
- Minimum Number of Swaps to Make the String Balanced · 21 lines
- Minimum Number of Taps to Open to Water a Garden · 44 lines
- Minimum Number of Vertices to Reach All Nodes · 17 lines
- Minimum Number of Work Sessions to Finish the Tasks · 25 lines
- Minimum Numbers of Function Calls to Make Target Array · 21 lines
- Minimum Obstacle Removal to Reach Corner · 33 lines
- Minimum One Bit Operations to Make Integers Zero · 13 lines
- Minimum Operations to Convert Number · 43 lines
- Minimum Operations to Halve Array Sum · 24 lines
- Minimum Operations to Make Array Equal · 10 lines
- Minimum Operations to Make a Subsequence · 35 lines
- Minimum Operations to Make a Uni-Value Grid · 18 lines
- Minimum Operations to Make the Array Alternating · 77 lines
- Minimum Operations to Make the Array Increasing · 15 lines
- Minimum Operations to Make the Array K-Increasing · 29 lines
- Minimum Path Cost in a Grid · 22 lines
- Minimum Path Sum · 21 lines
- Minimum Possible Integer After at Most K Adjacent Swaps On Digits · 83 lines
- Minimum Remove to Make Valid Parentheses · 33 lines
- Minimum Replacements to Sort the Array · 22 lines
- Minimum Rounds to Complete All Tasks · 21 lines
- Minimum Score After Removals on a Tree · 62 lines
- Minimum Score Triangulation of Polygon · 18 lines
- Minimum Sideway Jumps · 30 lines
- Minimum Size Subarray Sum · 16 lines
- Minimum Skips to Arrive at Meeting On Time · 38 lines
- Minimum Space Wasted From Packaging · 54 lines
- Minimum Speed to Arrive on Time · 26 lines
- Minimum Subsequence in Non-Increasing Order · 18 lines
- Minimum Suffix Flips · 18 lines
- Minimum Sum of Four Digit Number After Splitting Digits · 9 lines
- Minimum Sum of Squared Difference · 29 lines
- Minimum Swaps to Arrange a Binary Grid · 27 lines
- Minimum Swaps to Group All 1's Together II · 26 lines
- Minimum Swaps To Make Sequences Increasing · 36 lines
- Minimum Swaps to Make Strings Equal · 18 lines
- Minimum Time Difference · 36 lines
- Minimum Time to Collect All Apples in a Tree · 66 lines
- Minimum Time to Complete Trips · 28 lines
- Minimum Time to Finish the Race · 42 lines
- Minimum Time to Make Rope Colorful · 15 lines
- Minimum Time to Remove All Cars Containing Illegal Goods · 26 lines
- Minimum Time to Type Word Using Special Typewriter · 11 lines
- Minimum Time Visiting All Points · 15 lines
- Minimum Total Space Wasted With K Resizing Operations · 24 lines
- Minimum Value to Get Positive Step by Step Sum · 11 lines
- Minimum Weighted Subgraph With the Required Paths · 49 lines
- Minimum Window Substring · 32 lines
- Minimum XOR Sum of Two Arrays · 20 lines
- Mini Parser · 35 lines
- Min Max Game · 16 lines
- Min Stack · 37 lines
- Mirror Reflection · 10 lines
- Missing Number · 12 lines
- Monotone Increasing Digits · 17 lines
- Monotonic Array · 8 lines
- Most Beautiful Item for Each Query · 43 lines
- Most Common Word · 29 lines
- Most Frequent Subtree Sum · 24 lines
- Most Profit Assigning Work · 33 lines
- Most Stones Removed with Same Row or Column · 53 lines
- Most Visited Sector in a Circular Track · 24 lines
- Move Pieces to Obtain a String · 18 lines
- Move Zeroes · 17 lines
- Moving Stones Until Consecutive · 26 lines
- Moving Stones Until Consecutive II · 31 lines
- Multiply Strings · 49 lines
- My Calendar I · 16 lines
- My Calendar II · 20 lines
- My Calendar III · 16 lines
- Naming a Company · 22 lines
- N-ary Tree Level Order Traversal · 22 lines
- N-ary Tree Postorder Traversal · 14 lines
- N-ary Tree Preorder Traversal · 17 lines
- Nearest Exit from Entrance in Maze · 61 lines
- Network Delay Time · 46 lines
- New 21 Game · 18 lines
- Next Greater Element I · 28 lines
- Next Greater Element II · 24 lines
- Next Greater Element III · 26 lines
- Next Greater Node In Linked List · 27 lines
- Next Greater Numerically Balanced Number · 22 lines
- Next Permutation · 15 lines
- Nim Game · 6 lines
- Non-decreasing Array · 34 lines
- Non-negative Integers without Consecutive Ones · 47 lines
- Non-overlapping Intervals · 26 lines
- N-Queens · 59 lines
- N-Queens II · 19 lines
- N-Repeated Element in Size 2N Array · 15 lines
- Nth Digit · 34 lines
- Nth Magical Number · 69 lines
- N-th Tribonacci Number · 19 lines
- Number Complement · 11 lines
- Number of 1 Bits · 11 lines
- Number of Arithmetic Triplets · 16 lines
- Number of Atoms · 118 lines
- Number of Boomerangs · 24 lines
- Number of Burgers with No Waste of Ingredients · 34 lines
- Number of Closed Islands · 37 lines
- Number of Days Between Two Dates · 20 lines
- Number of Dice Rolls With Target Sum · 23 lines
- Number of Different Integers in a String · 15 lines
- Number of Different Subsequences GCDs · 22 lines
- Number of Digit One · 14 lines
- Number of Distinct Roll Sequences · 21 lines
- Number of Enclaves · 44 lines
- Number of Equivalent Domino Pairs · 17 lines
- Number of Excellent Pairs · 29 lines
- Number of Flowers in Full Bloom · 26 lines
- Number of Good Leaf Nodes Pairs · 40 lines
- Number of Good Pairs · 15 lines
- Number of Good Ways to Split a String · 22 lines
- Number of Increasing Paths in a Grid · 33 lines
- Number of Islands · 31 lines
- Number of Laser Beams in a Bank · 15 lines
- Number of Lines To Write String · 25 lines
- Number of Longest Increasing Subsequence · 20 lines
- Number of Matching Subsequences · 26 lines
- Number of Music Playlists · 31 lines
- Number of Nodes in the Sub-Tree With the Same Label · 41 lines
- Number of Operations to Make Network Connected · 46 lines
- Number of Orders in the Backlog · 43 lines
- Number of Pairs of Interchangeable Rectangles · 19 lines
- Number of Pairs of Strings With Concatenation Equal to Target · 21 lines
- Number of Paths with Max Score · 31 lines
- Number of People Aware of a Secret · 25 lines
- Number of Provinces · 30 lines
- Number of Recent Calls · 15 lines
- Number Of Rectangles That Can Form The Largest Square · 18 lines
- Number of Restricted Paths From First to Last Node · 48 lines
- Number of Segments in a String · 17 lines
- Number of Sets of K Non-Overlapping Line Segments · 20 lines
- Number of Smooth Descent Periods of a Stock · 23 lines
- Number of Squareful Arrays · 23 lines
- Number of Steps to Reduce a Number in Binary Representation to One · 34 lines
- Number of Steps to Reduce a Number to Zero · 21 lines
- Number of Strings That Appear as Substrings in Word · 10 lines
- Number of Students Doing Homework at a Given Time · 10 lines
- Number of Students Unable to Eat Lunch · 24 lines
- Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold · 23 lines
- Number of Subarrays with Bounded Maximum · 23 lines
- Number of Sub-arrays With Odd Sum · 30 lines
- Number of Submatrices That Sum to Target · 27 lines
- Number of Subsequences That Satisfy the Given Sum Condition · 46 lines
- Number of Substrings Containing All Three Characters · 24 lines
- Number of Substrings With Only 1s · 31 lines
- Number of Times Binary String Is Prefix-Aligned · 50 lines
- Number of Unique Good Subsequences · 20 lines
- Number of Valid Move Combinations On Chessboard · 103 lines
- Number of Valid Words for Each Puzzle · 21 lines
- Number of Valid Words in a Sentence · 23 lines
- Number of Visible People in a Queue · 34 lines
- Number of Ways of Cutting a Pizza · 68 lines
- Number of Ways to Arrive at Destination · 42 lines
- Number of Ways to Buy Pens and Pencils · 14 lines
- Number of Ways to Divide a Long Corridor · 25 lines
- Number of Ways to Form a Target String Given a Dictionary · 83 lines
- Number of Ways to Paint N × 3 Grid · 13 lines
- Number of Ways to Rearrange Sticks With K Sticks Visible · 30 lines
- Number Of Ways To Reconstruct A Tree · 62 lines
- Number of Ways to Reorder Array to Get Same BST · 91 lines
- Number of Ways to Select Buildings · 28 lines
- Number of Ways to Separate Numbers · 35 lines
- Number of Ways to Split Array · 15 lines
- Number of Ways to Split a String · 22 lines
- Number of Ways to Stay in the Same Place After Some Steps · 17 lines
- Number of Ways to Wear Different Hats to Each Other · 58 lines
- Number of Ways Where Square of Number Is Equal to Product of Two Numbers · 26 lines
- Number of Wonderful Substrings · 24 lines
- Number of Zero-Filled Subarrays · 17 lines
- Numbers At Most N Given Digit Set · 75 lines
- Numbers With Repeated Digits · 48 lines
- Numbers With Same Consecutive Differences · 24 lines
- Occurrences After Bigram · 35 lines
- Odd Even Jump · 65 lines
- Odd Even Linked List · 28 lines
- Ones and Zeroes · 36 lines
- Online Election · 40 lines
- Online Majority Element In Subarray · 58 lines
- Online Stock Span · 26 lines
- Open the Lock · 30 lines
- Operations on Tree · 83 lines
- Optimal Division · 29 lines
- Orderly Queue · 20 lines
- Out of Boundary Paths · 29 lines
- Pacific Atlantic Water Flow · 53 lines
- Paint House III · 33 lines
- Painting a Grid With Three Different Colors · 43 lines
- Pairs of Songs With Total Durations Divisible by 60 · 18 lines
- Palindrome Linked List · 33 lines
- Palindrome Number · 19 lines
- Palindrome Pairs · 76 lines
- Palindrome Partitioning · 30 lines
- Palindrome Partitioning II · 65 lines
- Palindrome Partitioning III · 49 lines
- Palindrome Partitioning IV · 21 lines
- Palindromic Substrings · 23 lines
- Pancake Sorting · 32 lines
- Parallel Courses II · 59 lines
- Parallel Courses III · 40 lines
- Parse Lisp Expression · 120 lines
- Parsing A Boolean Expression · 35 lines
- Partition Array According to Given Pivot · 21 lines
- Partition Array for Maximum Sum · 29 lines
- Partition Array into Disjoint Intervals · 33 lines
- Partition Array Into Three Parts With Equal Sum · 20 lines
- Partition Array Into Two Arrays to Minimize Sum Difference · 26 lines
- Partition Array Such That Maximum Difference Is K · 14 lines
- Partition Equal Subset Sum · 27 lines
- Partitioning Into Minimum Number Of Deci-Binary Numbers · 6 lines
- Partition Labels · 25 lines
- Partition List · 26 lines
- Partition to K Equal Sum Subsets · 28 lines
- Pascal's Triangle · 16 lines
- Pascal's Triangle II · 13 lines
- Patching Array · 23 lines
- Path Crossing · 36 lines
- Path In Zigzag Labelled Binary Tree · 28 lines
- Path Sum · 23 lines
- Path Sum II · 40 lines
- Path Sum III · 33 lines
- Path with Maximum Gold · 46 lines
- Path with Maximum Probability · 31 lines
- Path With Minimum Effort · 40 lines
- Peak Index in a Mountain Array · 6 lines
- Peeking Iterator · 51 lines
- People Whose List of Favorite Companies Is Not a Subset of Another List · 36 lines
- Percentage of Letter in String · 12 lines
- Perfect Number · 29 lines
- Perfect Rectangle · 24 lines
- Perfect Squares · 28 lines
- Permutation in String · 13 lines
- Permutations · 20 lines
- Permutation Sequence · 22 lines
- Permutations II · 23 lines
- Pizza With 3n Slices · 31 lines
- Plates Between Candles · 29 lines
- Plus One · 26 lines
- Poor Pigs · 10 lines
- Populating Next Right Pointers in Each Node · 26 lines
- Populating Next Right Pointers in Each Node II · 34 lines
- Positions of Large Groups · 27 lines
- Possible Bipartition · 29 lines
- Powerful Integers · 15 lines
- Power of Four · 13 lines
- Power of Three · 15 lines
- Power of Two · 8 lines
- Pow(x, n) · 27 lines
- Predict the Winner · 21 lines
- Prefix and Suffix Search · 82 lines
- Preimage Size of Factorial Zeroes Function · 31 lines
- Previous Permutation With One Swap · 12 lines
- Prime Arrangements · 25 lines
- Prime Number of Set Bits in Binary Representation · 56 lines
- Prime Palindrome · 32 lines
- Print Binary Tree · 24 lines
- Print Words Vertically · 40 lines
- Prison Cells After N Days · 22 lines
- Probability of a Two Boxes Having The Same Number of Distinct Balls · 31 lines
- Process Restricted Friend Requests · 72 lines
- Process Tasks Using Servers · 45 lines
- Product of Array Except Self · 23 lines
- Product of the Last K Numbers · 29 lines
- Profitable Schemes · 24 lines
- Projection Area of 3D Shapes · 35 lines
- Pseudo-Palindromic Paths in a Binary Tree · 33 lines
- Push Dominoes · 43 lines
- Pyramid Transition Matrix · 27 lines
- Queens That Can Attack the King · 28 lines
- Queries on a Permutation With Key · 18 lines
- Queries on Number of Points Inside a Circle · 43 lines
- Query Kth Smallest Trimmed Number · 24 lines
- Queue Reconstruction by Height · 46 lines
- Rabbits in Forest · 16 lines
- Race Car · 48 lines
- Random Flip Matrix · 25 lines
- Random Pick Index · 27 lines
- Random Pick with Blacklist · 24 lines
- Random Pick with Weight · 16 lines
- Random Point in Non-overlapping Rectangles · 33 lines
- Range Addition II · 9 lines
- Range Frequency Queries · 18 lines
- Range Module · 127 lines
- Range Sum of BST · 17 lines
- Range Sum of Sorted Subarray Sums · 22 lines
- Range Sum Query 2D - Immutable · 53 lines
- Range Sum Query - Immutable · 13 lines
- Range Sum Query - Mutable · 30 lines
- Rank Teams by Votes · 38 lines
- Rank Transform of a Matrix · 91 lines
- Rank Transform of an Array · 26 lines
- Ransom Note · 14 lines
- Reachable Nodes In Subdivided Graph · 51 lines
- Reachable Nodes With Restrictions · 35 lines
- Reach a Number · 52 lines
- Reaching Points · 82 lines
- Rearrange Array Elements by Sign · 140 lines
- Rearrange Characters to Make Target String · 23 lines
- Rearrange Spaces Between Words · 44 lines
- Rearrange Words in a Sentence · 34 lines
- Reconstruct a 2-Row Binary Matrix · 34 lines
- Reconstruct Itinerary · 25 lines
- Reconstruct Original Digits from English · 50 lines
- Recover a Tree From Preorder Traversal · 65 lines
- Recover Binary Search Tree · 23 lines
- Recover the Original Array · 34 lines
- Rectangle Area · 23 lines
- Rectangle Area II · 62 lines
- Rectangle Overlap · 24 lines
- Redistribute Characters to Make All Strings Equal · 16 lines
- Reduce Array Size to The Half · 23 lines
- Reducing Dishes · 18 lines
- Reduction Operations to Make the Array Elements Equal · 19 lines
- Redundant Connection · 69 lines
- Redundant Connection II · 64 lines
- Reformat Date · 23 lines
- Reformat Phone Number · 53 lines
- Reformat The String · 19 lines
- Regions Cut By Slashes · 60 lines
- Regular Expression Matching · 17 lines
- Relative Ranks · 31 lines
- Relative Sort Array · 48 lines
- Remove All Adjacent Duplicates In String · 25 lines
- Remove All Adjacent Duplicates in String II · 56 lines
- Remove All Occurrences of a Substring · 35 lines
- Remove Boxes · 31 lines
- Remove Colored Pieces if Both Neighbors are the Same Color · 14 lines
- Remove Comments · 38 lines
- Remove Covered Intervals · 20 lines
- Remove Digit From Number to Maximize Result · 13 lines
- Remove Duplicate Letters · 40 lines
- Remove Duplicates from Sorted Array · 13 lines
- Remove Duplicates from Sorted Array II · 24 lines
- Remove Duplicates from Sorted List · 45 lines
- Remove Duplicates from Sorted List II · 22 lines
- Remove Element · 18 lines
- Remove Invalid Parentheses · 52 lines
- Remove K Digits · 47 lines
- Remove Linked List Elements · 26 lines
- Remove Max Number of Edges to Keep Graph Fully Traversable · 91 lines
- Remove Nth Node From End of List · 34 lines
- Remove One Element to Make the Array Strictly Increasing · 14 lines
- Remove Outermost Parentheses · 24 lines
- Remove Palindromic Subsequences · 9 lines
- Remove Stones to Minimize the Total · 21 lines
- Remove Sub-Folders from the Filesystem · 29 lines
- Remove Zero Sum Consecutive Nodes from Linked List · 27 lines
- Removing Minimum and Maximum From Array · 15 lines
- Removing Minimum Number of Magic Beans · 17 lines
- Reorder Data in Log Files · 36 lines
- Reordered Power of 2 · 25 lines
- Reorder List · 23 lines
- Reorder Routes to Make All Paths Lead to the City Zero · 34 lines
- Reorganize String · 66 lines
- Repeated DNA Sequences · 29 lines
- Repeated String Match · 50 lines
- Repeated Substring Pattern · 46 lines
- Replace All Digits with Characters · 9 lines
- Replace All ?'s to Avoid Consecutive Repeating Characters · 30 lines
- Replace Elements in an Array · 12 lines
- Replace Elements with Greatest Element on Right Side · 24 lines
- Replace Non-Coprime Numbers in Array · 14 lines
- Replace the Substring for Balanced String · 33 lines
- Replace Words · 78 lines
- Reshape the Matrix · 23 lines
- Restore IP Addresses · 21 lines
- Restore The Array · 25 lines
- Restore the Array From Adjacent Pairs · 34 lines
- Reveal Cards In Increasing Order · 19 lines
- Reverse Bits · 20 lines
- Reverse Integer · 15 lines
- Reverse Linked List · 23 lines
- Reverse Linked List II · 56 lines
- Reverse Nodes in Even Length Groups · 58 lines
- Reverse Nodes in k-Group · 49 lines
- Reverse Only Letters · 26 lines
- Reverse Pairs · 55 lines
- Reverse Prefix of Word · 15 lines
- Reverse String · 15 lines
- Reverse String II · 17 lines
- Reverse Subarray To Maximize Array Value · 34 lines
- Reverse Substrings Between Each Pair of Parentheses · 25 lines
- Reverse Vowels of a String · 31 lines
- Reverse Words in a String · 25 lines
- Reverse Words in a String III · 16 lines
- Richest Customer Wealth · 12 lines
- Rings and Rods · 20 lines
- RLE Iterator · 54 lines
- Robot Bounded In Circle · 38 lines
- Robot Return to Origin · 39 lines
- Roman to Integer · 15 lines
- Root Equals Sum of Children · 9 lines
- Rotate Array · 11 lines
- Rotated Digits · 21 lines
- Rotate Function · 29 lines
- Rotate Image · 14 lines
- Rotate List · 38 lines
- Rotate String · 13 lines
- Rotating the Box · 25 lines
- Rotting Oranges · 41 lines
- Running Sum of 1d Array · 9 lines
- Russian Doll Envelopes · 17 lines
- Same Tree · 9 lines
- Satisfiability of Equality Equations · 18 lines
- Score After Flipping Matrix · 60 lines
- Score of Parentheses · 17 lines
- Scramble String · 57 lines
- Search a 2D Matrix · 15 lines
- Search a 2D Matrix II · 19 lines
- Search in a Binary Search Tree · 22 lines
- Search in Rotated Sorted Array · 72 lines
- Search in Rotated Sorted Array II · 59 lines
- Search Insert Position · 21 lines
- Search Suggestions System · 36 lines
- Seat Reservation Manager · 17 lines
- Second Largest Digit in a String · 22 lines
- Second Minimum Node In a Binary Tree · 26 lines
- Second Minimum Time to Reach Destination · 62 lines
- Self Crossing · 22 lines
- Self Dividing Numbers · 22 lines
- Sell Diminishing-Valued Colored Balls · 40 lines
- Selling Pieces of Wood · 27 lines
- Sender With Largest Word Count · 24 lines
- Sentence Similarity III · 1 lines
- Sequential Digits · 26 lines
- Sequentially Ordinal Rank Tracker · 40 lines
- Serialize and Deserialize Binary Tree · 12 lines
- Serialize and Deserialize BST · 66 lines
- Set Intersection Size At Least Two · 43 lines
- Set Matrix Zeroes · 22 lines
- Set Mismatch · 18 lines
- Shift 2D Grid · 30 lines
- Shifting Letters · 21 lines
- Shopping Offers · 35 lines
- Short Encoding of Words · 53 lines
- Shortest Bridge · 78 lines
- Shortest Common Supersequence · 56 lines
- Shortest Completing Word · 23 lines
- Shortest Distance to a Character · 36 lines
- Shortest Impossible Sequence of Rolls · 18 lines
- Shortest Palindrome · 57 lines
- Shortest Path in a Grid with Obstacles Elimination · 39 lines
- Shortest Path in Binary Matrix · 30 lines
- Shortest Path to Get All Keys · 76 lines
- Shortest Path Visiting All Nodes · 41 lines
- Shortest Path with Alternating Colors · 41 lines
- Shortest Subarray to be Removed to Make Array Sorted · 41 lines
- Shortest Subarray with Sum at Least K · 30 lines
- Shortest Unsorted Continuous Subarray · 33 lines
- Shuffle an Array · 18 lines
- Shuffle String · 12 lines
- Shuffle the Array · 13 lines
- Sign of the Product of an Array · 13 lines
- Similar String Groups · 41 lines
- Simple Bank System · 33 lines
- Simplified Fractions · 45 lines
- Simplify Path · 38 lines
- Single Element in a Sorted Array · 10 lines
- Single Number · 10 lines
- Single Number II · 17 lines
- Single Number III · 30 lines
- Single-Threaded CPU · 60 lines
- Sliding Puzzle · 55 lines
- Sliding Window Maximum · 19 lines
- Sliding Window Median · 125 lines
- Slowest Key · 20 lines
- Smallest Good Base · 32 lines
- Smallest Index With Equal Value · 8 lines
- Smallest Integer Divisible by K · 13 lines
- Smallest K-Length Subsequence With Occurrences of a Letter · 49 lines
- Smallest Missing Genetic Value in Each Subtree · 42 lines
- Smallest Number in Infinite Set · 23 lines
- Smallest Range Covering Elements from K Lists · 53 lines
- Smallest Range I · 9 lines
- Smallest Range II · 34 lines
- Smallest Rotation with Highest Score · 29 lines
- Smallest String Starting From Leaf · 35 lines
- Smallest String With A Given Numeric Value · 26 lines
- Smallest String With Swaps · 42 lines
- Smallest Subsequence of Distinct Characters · 30 lines
- Smallest Subtree with all the Deepest Nodes · 54 lines
- Smallest Sufficient Team · 72 lines
- Smallest Value of the Rearranged Number · 19 lines
- Snakes and Ladders · 37 lines
- Snapshot Array · 58 lines
- Solve the Equation · 17 lines
- Sort an Array · 16 lines
- Sort Array by Increasing Frequency · 22 lines
- Sort Array By Parity · 17 lines
- Sort Array By Parity II · 22 lines
- Sort Characters By Frequency · 25 lines
- Sort Colors · 25 lines
- Sort Even and Odd Indices Independently · 25 lines
- Sorting the Sentence · 29 lines
- Sort Integers by The Number of 1 Bits · 24 lines
- Sort Integers by The Power Value · 30 lines
- Sort Items by Groups Respecting Dependencies · 107 lines
- Sort List · 57 lines
- Sort the Jumbled Numbers · 26 lines
- Sort the Matrix Diagonally · 24 lines
- Soup Servings · 28 lines
- Special Array With X Elements Greater Than or Equal X · 15 lines
- Special Binary String · 33 lines
- Special Positions in a Binary Matrix · 42 lines
- Spiral Matrix · 63 lines
- Spiral Matrix II · 52 lines
- Spiral Matrix III · 38 lines
- Spiral Matrix IV · 54 lines
- Split Array into Consecutive Subsequences · 56 lines
- Split Array into Fibonacci Sequence · 32 lines
- Split Array Largest Sum · 36 lines
- Split Array With Same Average · 39 lines
- Split a String in Balanced Strings · 23 lines
- Split a String Into the Max Number of Unique Substrings · 23 lines
- Split Linked List in Parts · 31 lines
- Splitting a String Into Descending Consecutive Values · 19 lines
- Split Two Strings to Make Palindrome · 39 lines
- Sqrt(x) · 21 lines
- Squares of a Sorted Array · 10 lines
- Stamping the Grid · 64 lines
- Stamping The Sequence · 27 lines
- Statistics from a Large Sample · 36 lines
- Step-By-Step Directions From a Binary Tree Node to Another · 45 lines
- Steps to Make Array Non-decreasing · 31 lines
- Stickers to Spell Word · 43 lines
- Stock Price Fluctuation · 39 lines
- Stone Game · 17 lines
- Stone Game II · 20 lines
- Stone Game III · 44 lines
- Stone Game IV · 17 lines
- Stone Game IX · 45 lines
- Stone Game V · 31 lines
- Stone Game VI · 45 lines
- Stone Game VII · 15 lines
- Stone Game VIII · 14 lines
- Strange Printer · 26 lines
- Strange Printer II · 48 lines
- Stream of Characters · 78 lines
- String Compression · 50 lines
- String Compression II · 24 lines
- String Matching in an Array · 21 lines
- String to Integer (atoi) · 38 lines
- String Without AAA or BBB · 18 lines
- Strong Password Checker · 409 lines
- Strong Password Checker II · 27 lines
- Student Attendance Record I · 26 lines
- Student Attendance Record II · 51 lines
- Subarray Product Less Than K · 15 lines
- Subarray Sum Equals K · 34 lines
- Subarray Sums Divisible by K · 45 lines
- Subarrays with K Different Integers · 43 lines
- Subarray With Elements Greater Than Varying Threshold · 32 lines
- Subdomain Visit Count · 37 lines
- Subrectangle Queries · 19 lines
- Subsets · 24 lines
- Subsets II · 33 lines
- Substrings of Size Three with Distinct Characters · 13 lines
- Substring with Concatenation of All Words · 34 lines
- Substring With Largest Variance · 37 lines
- Subtract the Product and Sum of Digits of an Integer · 17 lines
- Subtree of Another Tree · 70 lines
- Successful Pairs of Spells and Potions · 18 lines
- Sudoku Solver · 35 lines
- Sum Game · 43 lines
- Summary Ranges · 35 lines
- Sum of Absolute Differences in a Sorted Array · 13 lines
- Sum of All Odd Length Subarrays · 18 lines
- Sum of All Subset XOR Totals · 17 lines
- Sum of Beauty in the Array · 30 lines
- Sum of Beauty of All Substrings · 20 lines
- Sum of Digits in Base K · 8 lines
- Sum of Digits of String After Convert · 27 lines
- Sum of Distances in Tree · 143 lines
- Sum of Even Numbers After Queries · 30 lines
- Sum of Floored Pairs · 45 lines
- Sum of k-Mirror Numbers · 38 lines
- Sum of Left Leaves · 16 lines
- Sum of Mutated Array Closest to Target · 48 lines
- Sum of Nodes with Even-Valued Grandparent · 17 lines
- Sum of Numbers With Units Digit K · 9 lines
- Sum of Root To Leaf Binary Numbers · 37 lines
- Sum of Scores of Built Strings · 21 lines
- Sum of Square Numbers · 21 lines
- Sum of Subarray Minimums · 17 lines
- Sum of Subarray Ranges · 18 lines
- Sum of Subsequence Widths · 17 lines
- Sum of Total Strength of Wizards · 48 lines
- Sum of Two Integers · 12 lines
- Sum of Unique Elements · 14 lines
- Sum Root to Leaf Numbers · 22 lines
- Super Egg Drop · 23 lines
- Super Palindromes · 40 lines
- Super Pow · 21 lines
- Super Ugly Number · 41 lines
- Super Washing Machines · 14 lines
- Surface Area of 3D Shapes · 25 lines
- Surrounded Regions · 70 lines
- Swap Adjacent in LR String · 26 lines
- Swap For Longest Repeated Character Substring · 44 lines
- Swap Nodes in Pairs · 18 lines
- Swapping Nodes in a Linked List · 52 lines
- Swim in Rising Water · 44 lines
- Symmetric Tree · 17 lines
- Tag Validator · 97 lines
- Tallest Billboard · 20 lines
- Target Sum · 25 lines
- Task Scheduler · 20 lines
- Task Scheduler II · 34 lines
- Teemo Attacking · 14 lines
- Text Justification · 55 lines
- The Earliest and Latest Rounds Where Players Compete · 29 lines
- The k Strongest Values in an Array · 18 lines
- The kth Factor of n · 13 lines
- The k-th Lexicographical String of All Happy Strings of Length n · 29 lines
- The K Weakest Rows in a Matrix · 23 lines
- The Latest Time to Catch a Bus · 40 lines
- The Number of Full Rounds You Have Played · 17 lines
- The Number of Good Subsets · 87 lines
- The Number of the Smallest Unoccupied Chair · 44 lines
- The Number of Weak Characters in the Game · 20 lines
- The Score of Students Solving Math Expression · 110 lines
- The Skyline Problem · 26 lines
- The Time When the Network Becomes Idle · 48 lines
- Third Maximum Number · 16 lines
- Thousand Separator · 19 lines
- Three Consecutive Odds · 17 lines
- Three Divisors · 12 lines
- Three Equal Parts · 38 lines
- Throne Inheritance · 31 lines
- Tiling a Rectangle with the Fewest Squares · 29 lines
- Time Based Key-Value Store · 29 lines
- Time Needed to Buy Tickets · 16 lines
- Time Needed to Inform All Employees · 21 lines
- Toeplitz Matrix · 10 lines
- To Lower Case · 13 lines
- Top K Frequent Elements · 21 lines
- Top K Frequent Words · 28 lines
- Total Appeal of A String · 23 lines
- Total Hamming Distance · 37 lines
- Transform to Chessboard · 63 lines
- Transpose Matrix · 16 lines
- Trapping Rain Water · 24 lines
- Trapping Rain Water II · 49 lines
- Tree of Coprimes · 42 lines
- Triangle · 23 lines
- Trim a Binary Search Tree · 29 lines
- Triples with Bitwise AND Equal To Zero · 22 lines
- Truncate Sentence · 22 lines
- Tuple with Same Product · 19 lines
- Tweet Counts Per Frequency · 51 lines
- Two Best Non-Overlapping Events · 22 lines
- Two City Scheduling · 26 lines
- Two Furthest Houses With Different Colors · 23 lines
- Two Out of Three · 14 lines
- Two Sum · 14 lines
- Two Sum II - Input Array Is Sorted · 22 lines
- Two Sum IV - Input is a BST · 67 lines
- Ugly Number · 15 lines
- Ugly Number II · 16 lines
- Ugly Number III · 58 lines
- Uncommon Words from Two Sentences · 25 lines
- Uncrossed Lines · 24 lines
- Unique Binary Search Trees · 31 lines
- Unique Binary Search Trees II · 38 lines
- Unique Email Addresses · 18 lines
- Unique Length-3 Palindromic Subsequences · 32 lines
- Unique Morse Code Words · 21 lines
- Unique Number of Occurrences · 18 lines
- Unique Paths · 17 lines
- Unique Paths II · 26 lines
- Unique Paths III · 48 lines
- Unique Substrings in Wraparound String · 19 lines
- Univalued Binary Tree · 15 lines
- UTF-8 Validation · 31 lines
- Valid Anagram · 11 lines
- Valid Arrangement of Pairs · 46 lines
- Validate Binary Search Tree · 20 lines
- Validate Binary Tree Nodes · 32 lines
- Validate IP Address · 92 lines
- Validate Stack Sequences · 17 lines
- Valid Boomerang · 13 lines
- Valid Mountain Array · 21 lines
- Valid Number · 35 lines
- Valid Palindrome · 20 lines
- Valid Palindrome II · 37 lines
- Valid Parentheses · 25 lines
- Valid Parenthesis String · 30 lines
- Valid Perfect Square · 21 lines
- Valid Permutations for DI Sequence · 58 lines
- Valid Square · 21 lines
- Valid Sudoku · 56 lines
- Valid Tic-Tac-Toe State · 52 lines
- Valid Triangle Number · 22 lines
- Verbal Arithmetic Puzzle · 65 lines
- Verifying an Alien Dictionary · 16 lines
- Verify Preorder Serialization of a Binary Tree · 16 lines
- Vertical Order Traversal of a Binary Tree · 56 lines
- Video Stitching · 43 lines
- Vowels of All Substrings · 19 lines
- Vowel Spellchecker · 73 lines
- Walking Robot Simulation · 51 lines
- Walking Robot Simulation II · 43 lines
- Water and Jug Problem · 32 lines
- Water Bottles · 21 lines
- Watering Plants · 18 lines
- Watering Plants II · 18 lines
- Ways to Make a Fair Array · 55 lines
- Ways to Split Array Into Three Subarrays · 21 lines
- Where Will the Ball Fall · 24 lines
- Widest Vertical Area Between Two Points Containing No Points · 10 lines
- Wiggle Sort II · 11 lines
- Wiggle Subsequence · 21 lines
- Wildcard Matching · 21 lines
- Word Break · 22 lines
- Word Break II · 33 lines
- Word Ladder · 75 lines
- Word Ladder II · 100 lines
- Word Pattern · 39 lines
- Word Search · 30 lines
- Word Search II · 71 lines
- Word Subsets · 42 lines
- X of a Kind in a Deck of Cards · 31 lines
- XOR Operation in an Array · 10 lines
- XOR Queries of a Subarray · 25 lines
- Zigzag Conversion · 24 lines
- Zuma Game · 54 lines