Algorithm
Collection of algorithm problem solving.
Index
- 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
- 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
- Cheapest Flights Within K Stops
- Check if All the Integers in a Range Are Covered
- Check if Every Row and Column Contains All Numbers
- Climbing Stairs
- Concatenated Words
- Concatenation of Consecutive Binary Numbers
- Construct Binary Search Tree from Preorder Traversal
- Contains Duplicate II
- 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 Linked List
- Design Circular Queue
- Detect Squares
- Detonate the Maximum Bombs
- Divide Intervals Into Minimum Number of Groups
- 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)
- 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 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 Keypresses
- 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
- My Calendar I
- My Calendar II
- My Calendar III
- Network Delay Time
- 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
- 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 Nth Node From End of List
- Reorder Data in Log Files
- Reorganize String
- Reverse Vowels of 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
- Splitting Array
- Step-By-Step Directions From a Binary Tree Node to Another
- Stock Price Fluctuation
- 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 IV - Input is a BST
- UTF-8 Validation
- Unique Binary Search Trees
- Unique Email Addresses
- 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