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