Home
Blog
Portfolio
Algo
About
Home
Blog
Portfolio
Algo
About
yokolet's notelets
Algorithm
Index
Arrays
4 Sum II
Bag of Tokens
Candy
Check if All the Integers in a Range Are Covered
Check if Every Row and Column Contains All Numbers
Check If N and Its Double Exist
Contains Duplicate II
Continuous Subarray Sum
Duplicate Zeros
Find Original Array From Doubled Array
Find the Difference of Two Arrays
Flood Fill
Gas Station
Make Array Zero by Subtracting Equal Amounts
Maximum Sum of Distinct Subarrays With Length K
Merge Sorted Array
Minimum Adjacent Swaps for K Consecutive Ones
Minimum Health to Beat Game
Minimum Knight Moves
Minimum Swaps to Group All 1's Together II
Minimum Time to Make Rope Colorful
Move Zeroes
Number of Islands
Pairs of Songs With Total Durations Divisible by 60
Partition Array Such That Maximum Difference Is K
Product of Array Except Self
Remove Duplicates from Sorted Array
Remove Element
Replace Elements with Greatest Element on Right Side
Rotting Oranges
Spiral Matrix
Subarray Sum Equals K
Sum of Even Numbers After Queries
The Latest Time to Catch a Bus
Trapping Rain Water
Two Sum
UTF-8 Validation
Valid Mountain Array
Valid Sudoku
Where Will the Ball Fall
Strings
Append Characters to String to Make Subsequence
Concatenated Words
Count and Say
Count Binary Substrings
Count Words Obtained After Adding a Letter
Counting Words With a Given Prefix
Find Words That Can Be Formed by Characters
Flip String to Monotone Increasing
Integer to Roman
Length of the Longest Valid Substring
License Key Formatting
Longest Palindrome
Longest Palindrome by Concatenating Two Letter Words
Longest String Chain
Maximum Length of a Concatenated String with Unique Characters
Minimum Genetic Mutation
Minimum Number of Moves to Make Palindrome
Minimum Number of Swaps to Make the Binary String Alternating
Minimum Window Substring
Optimal Partition of String
Palindrome Pairs
Push Dominoes
Reverse Vowels of a String
Reverse Words in a String
Subdomain Visit Count
Sum of Prefix Scores of Strings
Text Justification
Total Appeal of A String
Unique Email Addresses
Valid Palindrome
Valid Parentheses
Verifying an Alien Dictionary
Word Ladder
Word Ladder II
Linked lists
Delete Node in a Linked List
Maximum Twin Sum of a Linked List
Merge k Sorted Lists
Merge Two Sorted Lists
Odd Even Linked List
Palindrome Linked List
Remove Nth Node From End of List
Stacks and Queues
Basic Calculator II
Largest Rectangle in Histogram
Make The String Great
Maximum Number of Robots Within Budget
Minimum Remove to Make Valid Parentheses
Odd Even Jump
Remove Duplicate Letters
Sum of Subarray Minimums
Sum of Subarray Ranges
Sum of Total Strength of Wizards
Trees
Add One Row to Tree
Amount of Time for Binary Tree to Be Infected
Balanced Binary Tree
Binary Tree Inorder Traversal
Binary Tree Maximum Path Sum
Closest Binary Search Tree Value
Construct Binary Search Tree from Preorder Traversal
Convert Sorted Array to Binary Search Tree
Delete Node in a BST
Increasing Order Search Tree
Insert into a Binary Search Tree
Lowest Common Ancestor of a Binary Search Tree
Lowest Common Ancestor of a Binary Tree
Path Sum
Path Sum II
Pseudo-Palindromic Paths in a Binary Tree
Range Sum of BST
Recover Binary Search Tree
Step-By-Step Directions From a Binary Tree Node to Another
Two Sum IV - Input is a BST
Unique Binary Search Trees
Validate Binary Search Tree
Graphs
Cheapest Flights Within K Stops
Detonate the Maximum Bombs
Evaluate Division
Find All Possible Recipes from Given Supplies
Network Delay Time
Number of Good Paths
Number of Provinces
Path with Maximum Probability
Path With Minimum Effort
Satisfiability of Equality Equations
Shortest Path in a Grid with Obstacles Elimination
Dynamic Programming
Climbing Stairs
Count Unique Characters of All Substrings of a Given String
Filling Bookcase Shelves
Longest Common Subsequence
Longest Increasing Path in a Matrix
Maximum Length of Subarray With Positive Product
Maximum Length of Repeated Subarray
Maximum Score from Performing Multiplication Operations
Minimum Swaps To Make Sequences Increasing
Number of Ways to Select Buildings
Student Attendance Record II
Substring With Largest Variance
Backtracking
Word Search
Word Search II
Sorting and searching
Contains Duplicate III
Count Number of Rectangles Containing Each Point
Divide Intervals Into Minimum Number of Groups
Earliest Possible Day of Full Bloom
Find First and Last Position of Element in Sorted Array
Find K Closest Elements
Find K-th Smallest Pair Distance
K Closest Points to Origin
Maximum Units on a Truck
Median of Two Sorted Arrays
Meeting Rooms III -- Most Used Room
Merge Intervals
Minimum Cost to Connect Sticks
Number of Flowers in Full Bloom
Plates Between Candles
Race Car
Reorder Data in Log Files
Reorganize String
Search Suggestions System
Sliding Window Median
Top K Frequent Elements
Design
Binary Search Tree Iterator
Design Circular Queue
Detect Squares
Find Median from Data Stream
Insert Delete GetRandom O(1)
LRU Cache
My Calendar I
My Calendar II
My Calendar III
Online Stock Span
Peeking Iterator
Random Pick with Weight
Range Module
Snapshot Array
Stock Price Fluctuation
Time Based Key-Value Store
Others
Alert Using Same Key-Card Three or More Times in a One Hour Period
Concatenation of Consecutive Binary Numbers
Find Triangular Sum of an Array
Largest Perimeter Triangle
Maximum 69 Number
Maximum AND Sum of Array
Maximum Number of Visible Points
Minimum Time Difference
Robot Bounded In Circle
Set Mismatch
The kth Factor of n
Stocks
Best Time to Buy and Sell Stock -- Basic
Best Time to Buy and Sell Stock III -- Two Transactions
Best Time to Buy and Sell Stock II -- Multiple Times
Best Time to Buy and Sell Stock IV -- At Most K Transactions
Best Time to Buy and Sell Stock with Cooldown
Best Time to Buy and Sell Stock with Transaction Fee
Minimize Maximum
Koko Eating Bananas
Maximum Candies Allocated to K Children
Minimum Limit of Balls in a Bag
Minimum Number of Days to Make m Bouquets
Shipping Packages in D Days
Splitting Array
Games
Maximum Number of Coins You Can Get
Nim Game
Predict the Winner
Stone Game
Algorithm
Index
4 Sum II
Add One Row to Tree
Alert Using Same Key-Card Three or More Times in a One Hour Period
Amount of Time for Binary Tree to Be Infected
Append Characters to String to Make Subsequence
Bag of Tokens
Balanced Binary Tree
Basic Calculator II
Best Time to Buy and Sell Stock -- Basic
Best Time to Buy and Sell Stock II -- Multiple Times
Best Time to Buy and Sell Stock III -- Two Transactions
Best Time to Buy and Sell Stock IV -- At Most K Transactions
Best Time to Buy and Sell Stock with Cooldown
Best Time to Buy and Sell Stock with Transaction Fee
Binary Search Tree Iterator
Binary Tree Inorder Traversal
Binary Tree Maximum Path Sum
Candy
Cheapest Flights Within K Stops
Check If N and Its Double Exist
Check if All the Integers in a Range Are Covered
Check if Every Row and Column Contains All Numbers
Climbing Stairs
Closest Binary Search Tree Value
Concatenated Words
Concatenation of Consecutive Binary Numbers
Construct Binary Search Tree from Preorder Traversal
Contains Duplicate II
Contains Duplicate III
Continuous Subarray Sum
Convert Sorted Array to Binary Search Tree
Count Binary Substrings
Count Number of Rectangles Containing Each Point
Count Unique Characters of All Substrings of a Given String
Count Words Obtained After Adding a Letter
Count and Say
Counting Words With a Given Prefix
Delete Node in a BST
Delete Node in a Linked List
Design Circular Queue
Detect Squares
Detonate the Maximum Bombs
Divide Intervals Into Minimum Number of Groups
Duplicate Zeros
Earliest Possible Day of Full Bloom
Evaluate Division
Filling Bookcase Shelves
Find All Possible Recipes from Given Supplies
Find First and Last Position of Element in Sorted Array
Find K Closest Elements
Find K-th Smallest Pair Distance
Find Median from Data Stream
Find Original Array From Doubled Array
Find Triangular Sum of an Array
Find Words That Can Be Formed by Characters
Find the Difference of Two Arrays
Flip String to Monotone Increasing
Flood Fill
Gas Station
Increasing Order Search Tree
Insert Delete GetRandom O(1)
Insert into a Binary Search Tree
Integer to Roman
K Closest Points to Origin
Koko Eating Bananas
LRU Cache
Largest Perimeter Triangle
Largest Rectangle in Histogram
Length of the Longest Valid Substring
License Key Formatting
Longest Common Subsequence
Longest Increasing Path in a Matrix
Longest Palindrome
Longest Palindrome by Concatenating Two Letter Words
Longest String Chain
Lowest Common Ancestor of a Binary Search Tree
Lowest Common Ancestor of a Binary Tree
Make Array Zero by Subtracting Equal Amounts
Make The String Great
Maximum 69 Number
Maximum AND Sum of Array
Maximum Candies Allocated to K Children
Maximum Length of Repeated Subarray
Maximum Length of Subarray With Positive Product
Maximum Length of a Concatenated String with Unique Characters
Maximum Number of Coins You Can Get
Maximum Number of Robots Within Budget
Maximum Number of Visible Points
Maximum Score from Performing Multiplication Operations
Maximum Sum of Distinct Subarrays With Length K
Maximum Twin Sum of a Linked List
Maximum Units on a Truck
Median of Two Sorted Arrays
Meeting Rooms III -- Most Used Room
Merge Intervals
Merge Sorted Array
Merge Two Sorted Lists
Merge k Sorted Lists
Minimum Adjacent Swaps for K Consecutive Ones
Minimum Cost to Connect Sticks
Minimum Genetic Mutation
Minimum Health to Beat Game
Minimum Knight Moves
Minimum Limit of Balls in a Bag
Minimum Number of Days to Make m Bouquets
Minimum Number of Moves to Make Palindrome
Minimum Number of Swaps to Make the Binary String Alternating
Minimum Remove to Make Valid Parentheses
Minimum Swaps To Make Sequences Increasing
Minimum Swaps to Group All 1's Together II
Minimum Time Difference
Minimum Time to Make Rope Colorful
Minimum Window Substring
Move Zeroes
My Calendar I
My Calendar II
My Calendar III
Network Delay Time
Nim Game
Number of Flowers in Full Bloom
Number of Good Paths
Number of Islands
Number of Provinces
Number of Ways to Select Buildings
Odd Even Jump
Odd Even Linked List
Online Stock Span
Optimal Partition of String
Pairs of Songs With Total Durations Divisible by 60
Palindrome Linked List
Palindrome Pairs
Partition Array Such That Maximum Difference Is K
Path Sum
Path Sum II
Path With Minimum Effort
Path with Maximum Probability
Peeking Iterator
Plates Between Candles
Predict the Winner
Product of Array Except Self
Pseudo-Palindromic Paths in a Binary Tree
Push Dominoes
Race Car
Random Pick with Weight
Range Module
Range Sum of BST
Recover Binary Search Tree
Remove Duplicate Letters
Remove Duplicates from Sorted Array
Remove Element
Remove Nth Node From End of List
Reorder Data in Log Files
Reorganize String
Replace Elements with Greatest Element on Right Side
Reverse Vowels of a String
Reverse Words in a String
Robot Bounded In Circle
Rotting Oranges
Satisfiability of Equality Equations
Search Suggestions System
Set Mismatch
Shipping Packages in D Days
Shortest Path in a Grid with Obstacles Elimination
Sliding Window Median
Snapshot Array
Spiral Matrix
Splitting Array
Step-By-Step Directions From a Binary Tree Node to Another
Stock Price Fluctuation
Stone Game
Student Attendance Record II
Subarray Sum Equals K
Subdomain Visit Count
Substring With Largest Variance
Sum of Even Numbers After Queries
Sum of Prefix Scores of Strings
Sum of Subarray Minimums
Sum of Subarray Ranges
Sum of Total Strength of Wizards
Text Justification
The Latest Time to Catch a Bus
The kth Factor of n
Time Based Key-Value Store
Top K Frequent Elements
Total Appeal of A String
Trapping Rain Water
Two Sum
Two Sum IV - Input is a BST
UTF-8 Validation
Unique Binary Search Trees
Unique Email Addresses
Valid Mountain Array
Valid Palindrome
Valid Parentheses
Valid Sudoku
Validate Binary Search Tree
Verifying an Alien Dictionary
Where Will the Ball Fall
Word Ladder
Word Ladder II
Word Search
Word Search II