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