## 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 New Area Painted Each Day
- Amount of Time for Binary Tree to Be Infected
- Analyze User Website Visit Pattern
- 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
- Buildings With an Ocean View
- 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
- Closest Binary Search Tree Value
- 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 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
- Cutting Ribbons
- Delete Node in a Linked List
- Design Circular Queue
- Design Hit Counter
- Design Log Storage System
- Design Snake Game
- Detect Squares
- Detonate the Maximum Bombs
- Divide Chocolate
- 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 Leaves of Binary Tree
- 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
- Finding the Number of Visible Mountains
- Flip String to Monotone Increasing
- Flood Fill
- Gas Station
- Increasing Order Search Tree
- Inorder Successor in BST
- 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
- License Key Formatting
- Logger Rate Limiter
- 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 Books You Can Take
- Maximum Number of Robots Within Budget
- Maximum Number of Visible Points
- Maximum Score from Performing Multiplication Operations
- Maximum Twin Sum of a Linked List
- Maximum Units on a Truck
- Median of Two Sorted Arrays
- Meeting Rooms II -- Minimum Rooms
- Meeting Rooms III -- Most Used Room
- Merge Sorted Array
- Merge Two Sorted Lists
- Merge k Sorted Lists
- Minimum Adjacent Swaps for K Consecutive Ones
- Minimum Adjacent Swaps to Make a Valid Array
- 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
- 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 Addition
- 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
- Sentence Screen Fitting
- Set Mismatch
- Shipping Packages in D Days
- Shortest Path in a Grid with Obstacles Elimination
- Shortest Path to Get Food
- 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 Earliest Moment When Everyone Become Friends
- 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