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