- Sort Colors
- Maximum Subarray
- Last Stone Weight
- Find The Duplicate Number --IMP --Revise
- Determine if Two Strings Are Close
- Design an Ordered Stream
- Minimum Operations to Reduce X to Zero
- House Robber (DP)
- Coin Change 2 (DP)
- Coin Change (DP)
- Edit Distance(DP) --IMP --Hard
- Longest_Common_Subsequence (DP)
- Jump Game II (DP) --Revise --IMP
- First Unique Character in a String
- Best Time to Buy and Sell Stock (DP)
- Best Time to Buy and Sell Stock 2 (DP)
- Best Time to Buy and Sell Stock 3 (DP) --Hard --Revise
- Best Time to Buy and Sell Stock 4 (DP) --Hard --Revise
- Jump Game (Greedy)
- Richest Customer Wealth
- Find the Most Competitive Subsequence (Stack) --IMP
- Maximum Depth of Binary Tree (Tree)
- Shortest Word Distance (Two-pointer)
- Linked List Random Node (Randomized Algo) --IMP
- Two Sum
- Binary Tree Inorder Traversal (Tree)
- Increasing_Order_Search_Tree (Tree)
- The kth Factor of n
- Can Place Flowers
- Goal Parser Interpretation
- Max Number of K-Sum Pairs
- Populating Next Right Pointers in Each Node II
- Spiral Matrix II
- Pairs of Songs With Total Durations Divisible by 60
- Binary Search Tree Iterator (Tree)
- Valid Mountain Array
- Remove Duplicates from Sorted Array II
- Count the Number of Consistent Strings
- Sum of Absolute Differences in a Sorted Array
- Smallest Subtree with all the Deepest Nodes
- Burst Baloons (LR DP) --IMP Concept --Hard
- Palindrome Partitioning (Backtracking) --IMP
- Squares of a Sorted Array
- Plus One Linked List
- Validate Binary Search Tree (BST) --IMP
- 4Sum II
- Increasing Triplet Subsequence --IMP
- Cherry Pickup II
- Decoded String at Index --Hard
- Smallest Range II --Tricky --Revise
- Swap Nodes in Pairs --Revise
- Diagonal Traverse
- Number of Students Unable to Eat Lunch
- Average Waiting Time
- Determine if String Halves Are Alike
- Middle of the Linked List
- Rotate List
- Reverse Linked List
- Jump Game IV (BFS) --IMP
- Reach a Number --Tricky --IMP
- Partition Equal Subset Sum (DP)
- Target Sum (DP) --IMP
- Combination Sum (DP) (Backtracing) --IMP --Revise
- Combination Sum II (Backtracking) --IMP --Revise
- Maximum Number of Balls in a Box
- Number of 1 Bits
- Trim a Binary Search Tree (Tree)
- Linked List Cycle
- Search in a Binary Search Tree (Tree)
- Arithmetic Slices (DP) --IMP --Revise
- Number of Islands (DFS on grid) (Graphs)
- Distribute Candies
- Set Mismatch
- Missing Number
- Intersection of Two Linked Lists
- Average of Levels in Binary Tree
- Short Encoding of Words --Revise
- Design HashMap
- Remove Palindromic Subsequences
- Add One Row to Tree (Tree) --Revise
- Integer to Roman
- Check If a String Contains All Binary Codes of Size K --Revise
- Binary Trees With Factors (DP) --Revise ---IMP
- Swapping Nodes in a Linked List
- Best Time to Buy and Sell Stock with Transaction Fee (DP) --Revise ---IMP
- Invert Binary Tree (Tree)
- Add Two Numbers
- Wiggle Subsequence (DP) --Revise --IMP
- Max Consecutive Ones III (Slding Window) --IMP
- Keys and Rooms (DFS)
- Longest Substring Without Repeating Characters (Sliding Window)
- Course Schedule (Graphs) --IMP
- Second Largest Digit in a String
- Design Authentication Manager
- Reordered Power of 2
- Find a Corresponding Node of a Binary Tree in a Clone of That Tree (Tree)
- Sum of Nodes with Even-Valued Grandparent (Tree)
- Deepest Leaves Sum (Tree)
- Range Sum of BST (Tree)
- Binary Search (Binary Search)
- Valid Square
- Check if the Sentence Is Pangram
- Maximum Ice Cream Bars (Sorting)
- Replace All Digits with Characters
- Seat Reservation Manager
- Maximum Element After Decreasing and Rearranging (Sorting)
- Range Sum of Sorted Subarray Sums (Prefix Sum)
- Range Sum Query 2D - Immutable (DP)
- Minimum Distance to the Target Element
- Splitting a String Into Descending Consecutive Values (Backtracking)
- Next Permutation --Revise --IMP
- Non-decreasing Array --Revise --Tricky
- Path Sum (Tree)
- Search in Rotated Sorted Array (Binary Search)
- Climbing Stairs (DP)
- Convert Sorted List to Binary Search Tree (DnC) (Tree) --Revise --Tricky
- Find First and Last Position of Element in Sorted Array (Binary Search) --IMP
- First Bad Version (Binary Search)
- Rotting Oranges (BFS)
- Delete Operation for Two Strings (DP)
- Capacity To Ship Packages Within D Days (Binary Search) --Revise --IMP
- Koko Eating Bananas (Binary Search) --Revise
- Maximum Population Year
- Maximum Distance Between a Pair of Values (Binary Search)
- Split Array Largest Sum (Binary Search) --Revise --Hard
- Maximum Points You Can Obtain from Cards (Sliding Window) (Prefix Sum)
- Minimum Number of Days to Make m Bouquets (Binary Search) --Revise
- Sorting the Sentence
- Incremental Memory Leak
- Rotating the Box
- Daily Temperatures( Monotonic Stack)
- Product of Array Except Self --IMP
- Maximum Erasure Value (Slidign Window)
- Out of Boundary Paths (DP)
- 3Sum (Two Pointer)
- Find K Closest Elements (Binary Search) --IMP --Tricky --Revise
- Maximum Product Difference Between Two Pairs (Sorting)
- Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold (Sliding Window)
- Same Tree (Tree)
- Symmetric Tree (Tree)
- Kth Smallest Element in a BST (Tree)
- Eliminate Maximum Number of Monsters (Greedy) (Priority Queue) --IMP
- All Paths From Source to Target (Graphs) (DFS) --IMP
- Video Stitching (DP) (Greedy) --Revise
- Max Area of Island (DFS)
- Island Perimeter (DFS)
- Path Sum II (Tree) (DFS)
- Reduce Array Size to The Half
- Merge k Sorted Lists (Linked List) --HARD --Revise
- Merge Intervals (Greedy)
- Two City Scheduling (Greedy)
- Minimum Number of Arrows to Burst Balloons (Greedy) (Line Sweep)
- Find Bottom Left Tree Value (Tree)
- Combination Sum III (Backtracking)
- Smallest Range I
- Valid Triangle Number (Two Pointer)
- Non-Overlapping Intervals (Greedy)
- Remove Nth Node From End of List
- Maximum Profit in Job Scheduling (DP + Binary Search) --Hard --IMP
- Surrounded Regions (DFS)
- Nearest Exit from Entrance in Maze (BFS)
- Course Schedule II (Graphs) (Topsort)
- Nim Game
- Delete and Earn (DP) --IMP --Revise --Tricky
- Contains Duplicate
- Maximum Difference Between Node and Ancestor (Tree) --IMP
- Unique Paths (DP)
- Binary Tree Pruning (Tree)
- Minimum ASCII Delete Sum for Two Strings (DP)
- 3Sum Closest (Two Pointer)
- Matrix Block Sum (Prefix Sum)
- Decrease Elements To Make Array Zigzag --Revise
- Reverse Words in a String III
- Find Minimum Time to Finish All Jobs (Binary Search) (DFS) --Revise --IMP --Hard
- Minimum Limit of Balls in a Bag (Binary Search) --Tricky --Revise
- Longest Happy Prefix (KMP)
- Shortest Palindrome (KMP)
- Stone Game (Greedy)
- Minimum Path Sum (Grid DP)
- Jump Game III (BFS)
- Plus One
- Critical Connections in a Network (Graphs) (Bridges) --Hard --Revise
- Minimum Height Trees (Graphs) (Center of Tree) --IMP
- Kth Ancestor of a Tree Node (Graphs) (Binary Lifting) --IMP --Hard
- Design Add and Search Words Data Structure (Trie)
- Last Day Where You Can Still Cross (Binary Search) (BFS)
- Array With Elements Not Equal to Average of Neighbors
- Group the People Given the Group Size They Belong To
- Number of Substrings With Only 1s
- Binary Tree Maximum Path Sum --Revise --IMP
- Count Vowels Permutation (DP)
- Sum of Even Numbers After Queries
- Palindromic Substrings (DP)
- Longest Palindromic Substring (DP) --Revise --IMP
- Minimum Number of Vertices to Reach All Nodes (Graph) --Revise
- Redundant Connection (DSU)
- Binary Tree Zigzag Level Order Traversal (Tree) (BFS)
- Minimum Size Subarray Sum (Sliding Window)
- Longest Palindromic Subsequence (DP) --Revise
- Contiguous Array --IMP CONCEPT __Revise
- Number of Ways to Arrive at Destination (Graphs) (Dijkstra) --IMP
- Array Nesting (DSU)
- Path with Maximum Probability (Graphs) (Dijkstra)
- Top K Frequent Elements (Bucket Sort) --IMP concept
- Unique Paths II (DP)
- Number of Operations to Make Network Connected (DSU)
- Find Minimum in Rotated Sorted Array (Binary Search)
- Global and Local Inversions (Merge Sort) --IMP Concept
- Find Eventual Safe States (Graphs) (DFS)
- Longest Increasing Subsequence (DP)
- Letter Combinations of a Phone Number (Backtracking)
- Maximal Square (DP)
- Word Break (DP)
- Palindrome Partitioning II (DP) (DnC DP)
- Stone Game II (DP) (Game Theory)
- Stone Game VII (DP) (Game Theory)
- House Robber II (DP)
- Maximum Length of Pair Chain (DP)
- Convert BST to Greater Tree (BST)
- Complete Binary Tree Inserter (Tree)
- Construct K Palindrome Strings
- Cherry Pickup (DP) (Grid DP) --IMP concept
- Decode Ways (DP)
- Insertion Sort List (Linked List) --IMP
- Binary Tree Level Order Traversal II
- Word Ladder (BFS)
- Numbers At Most N Given Digit Set (Digit DP) --IMP Concept --HARD
- Word Ladder II (BFS) --Hard
- Decode String
- Stone Game III (DP) (Game Theory) --HARD --IMP
- Decode XORed Array
- Maximum XOR With an Element From Array (Sorting + BIT Trie) --HARD --IMP
- Maximum XOR of Two Numbers in an Array (BIT Trie) --Revise
- Merge In Between Linked Lists (Linked List)
- Maximum Score from Performing Multiplication Operations (DP)
- Binary Subarrays With Sum (Sliding Window + HashMap) --IMP --Tricky --Revise
- Subarray Sum Equals K (Sliding Window + HashMap) --IMP --Tricky --Revise
- Graph Connectivity With Threshold (DSU + Seive) --Hard
- Balance a Binary Search Tree (BST)
- Furthest Building You Can Reach (Greedy) (Priority Queue) --IMP
- Network Delay Time (Graphs) (Dijkstra)
- Longest Substring with At Least K Repeating Characters (Sliding Window) --New CONCEPT --IMP
- Longest Increasing Path in a Matrix (DP + DFS on matrix) --Concept --IMP --HARD
- Max Increase to Keep City Skyline
- Car Pooling (Partial and Prefix Sums) --Revise
- Maximum Fruits Harvested After at Most K Steps (Prefix Sums) --HARD --IMP --Revise
- Count Servers that Communicate
- Maximum Score Words Formed by Letters
- Number of Laser Beams in a Bank
- Destroying Asteroids (Sorting)
- Execution of All Suffix Instructions Staying in a Grid
- Intervals Between Identical Elements (Prefix Sum) --IMP --Revise
- Evaluate Reverse Polish Notation (Stack)
- Maximum Twin Sum of a Linked List
- Longest Palindrome by Concatenating Two Letter Words
- Robot Bounded In Circle --Tricky --Revise
- Minimum Swaps to Group All 1's Together II (Sliding Window) --IMP --Revise
- Count Words Obtained After Adding a Letter (Trie) --Revise
- Increasing Subsequences (Backtrack) --Tricky --Revise --IMP
- Sliding Window Maximum (Monotonic Queue) --IMP
- Max Value of Equation (Monotonic Queue) --Tricky for Monoque
- Maximal Network Rank (Graphs)
- Trapping Rain Water (Greedy) --IMP
- Count Good Meals --Tricky
- Maximum Number of Coins You Can Get (Sorting) (Greedy)
- Palindrome Partitioning III (DP) --IMP --Revise
- Palindrome Partitioning IV (DP) --IMP --Revise
- Earliest Possible Day of Full Bloom (Greedy)
- Stone Game IV (DP) (Game Theory)
- Stone Game V (DnC DP)
- Stone Game VI (Greedy) --IMP --Revise
- Maximum Level Sum of a Binary Tree (BFS)
- Stone Game VIII (Game Theory DP) --Tricky Optimization --Revise
- Sum of Subarray Ranges (MonoStack) --Tricky --V IMP
- Sum of Subarray Minimums (MonoStack)
- Maximize Distance to Closest Person (Two Pointer)
- Dungeon Game (Grid DP) --Very IMP --Tricky
- Solving Questions With Brainpower (Knapsack DP)
- Container With Most Water (Two Pointer) (Greedy) --IMP
- Delete Node in a BST --Tricy --IMP --Revise
- Linked List Cycle II
- Minimum Swaps To Make Sequences Increasing (DP) --IMP
- Closest Divisors
- Constrained Subsequence Sum (DP + MonoQueue) --New Concept --TOUGH --IMP --Revise
- Remove Sub-Folders from the Filesystem (Trie)
- Count Primes (Seive of Eratothenes)
- Number of Pairs of Interchangeable Rectangles
- Maximum Height by Stacking Cuboids (DP) --TOUGH --IMP --Revise
- Gas Station (Two Pointer) --Tricky
- Closest Dessert Cost (Backtracking) --Concept Revise
- Shortest Subarray with Sum at Least K (Monoqueue+Prefix Sum) --V.V.IMP --Must Revise
- Count Good Nodes in Binary Tree (DFS)
- Count the Hidden Sequences (Math) --Read editorial
- Path with Maximum Gold (Backtracking)
- Sequential Digits
- Partition Labels (Two Pointer)
- Maximum Length of Subarray With Positive Product (DP) --IMP --Must Revise
- Range Sum Query - Mutable (Segment Tree)
- Perfect Rectangle (Observation Based)
- Watering Plants
- Longest Word in Dictionary through Deleting (Two Pointer)
- The Skyline Problem (SweepLine) --Must Revise
- Number of Provinces (DSU)
- K Closest Points to Origin (PriorityQueue)
- Integer Replacement (DP)
- All Elements in Two Binary Search Trees (BST) --Concept --Revise
- Print Words Vertically
- Minimum Number of Taps to Open to Water a Garden (Greedy) --Concept
- The k-th Lexicographical String of All Happy Strings of Length n
- Minimize Maximum Pair Sum in Array (Greedy)
- Rotate Array --Tricky --Revise --IMP
- Shortest Common Supersequence (DP)
- Partitioning Into Minimum Number Of Deci-Binary Numbers
- Task Scheduler (Priority Queue) --Revise --Imp --Tricky
- Number of Enclaves (DFS on grid)
- Number of Closed Islands (DFS on Grid) --Revise
- Check If Array Pairs Are Divisible by k --Tricky --V. IMP --CONCEPT --Revise
- Find All Anagrams in a String (Fixed Sliding Window)
- Count Number of Teams (Prefix and Suffix Count) --V.IMP --Concept -- Revise
- Minimum Number of Increments on Subarrays to Form a Target Array --V. V. Tricky
- Numbers With Same Consecutive Differences (Recursion)
- Reducing Dishes (Knapsack Type DP)
- Predict the Winner (Game Theory DP)
- Word Search (DFS)
- Relative Sort Array (Coordinate Compression)
- Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts (Greedy) --IMP --Revise
- Grid Game (Prefix Sum)
- Map Sum Pairs (Trie)
- Minimum Interval to Include Each Query (Line Sweep) --Tough --Concept
- Partition Array According to Given Pivot
- Remove K Digits (Monotonic Queue)
- Majority Element (Majority Vote Algorithm) --IMP --Revise
- Number of Orders in the Backlog (2 Heaps) --Solved in One go
- K-diff Pairs in an Array (HashMap)
- Letter-case Permutation
- Distribute Coins in Binary Tree (DFS) --Tricky --IMP
- Delete Leaves With a Given Value (PostOrder)
- Candy (Greedy) --CONCEPT --Tricky --IMP --REVISE
- Meeting Rooms II (Sweep Line) (Solved on InterviewBit)
- Shortest Path with Alternating Colors (BFS) --CONCEPT --Tricky
- Unique Binary Search Trees II (DnC algorithm) --IMP --REVISE
- Minimize Hamming Distance After Swap Operations (Union Find) --Concept with implementation heavy
- Permutation in String (Fixed Sliding Window)
- Subsets
- Largest Divisible Subset (DP) --Tricky
- Maximum Number of Vowels in a Substring of Given Length (Fixed Sliding Window)
- Min Cost to Connect All Points (Kruskal MST) --Revise --IMP
- Smallest String With Swaps (DSU) --IMP
- Minimum Operations to Make the Array Alternating
- Removing Minimum Number of Magic Beans (Prefix Sum) --CONCEPT --IMP
- Permutations (Backtracking)
- Additive Number (Backtracking) --Crazy Tricky level
- Max Chunks To Make Sorted (Greedy) --IMP
- Minimum Elements to Add to Form a Given Sum
- Max Chunks To Make Sorted II (Greedy) --CONCEPT --IMP
- Minimize Deviation in Array (Greedy) --IMP --HARD --Revise --Tricky
- Insert Delete GetRandom O(1) --Tricky
- Find Three Consecutive Integers That Sum to a Given Number
- Maximum Split of Positive Even Integers
- Remove Covered Intervals (Greedy)
- Lowest Common Ancestor of a Binary Tree(Tree) --Revise
- Merge Nodes in Between Zeros
- Construct String With Repeat Limit (Greedy)
- Sum of Distances in Tree (Tree DP) --HARD --Tricky --IMP --REVISE --Concept
- Longest ZigZag Path in a Binary Tree (Tree DP) --IMP
- Minimum Remove to Make Valid Parentheses (Stack) --Tricky --Revise
- Find K-th Smallest Pair Distance (Binary Search + Sliding Window) --V Tough --Concept
- Count Array Pairs Divisible by K (HashMap + Math) --Concept --IMP
- Minimum Deletions to Make String Balanced (DP) --IMP --Revise
- Longest Repeating Character Replacement (Sliding Window)
- Number of Sub-arrays With Odd Sum (Prefix Sum) --IMP --REVISE
- Subarray Sums Divisible by K (Prefix Sum) --IMP --REVISE
- Max Sum of Rectangle No Larger Than K (Prefix Sum + TreeSet)
- Sort List (Merge Sort) --IMP
- Maximum Sum Obtained of Any Permutation (Partial Sums)
- Reverse Substrings Between Each Pair of Parentheses (Stack + Queue)
- Reverse Nodes in k-Group --Implementation Heavy
- Longest Consecutive Sequence (DSU) --IMP --Revise
- Shortest Path Visiting All Nodes (Graphs + DP) --Tricky --HARD
- Minimum Number of Steps to Make Two Strings Anagram II
- Minimum Time to Complete Trips (Binary Search)
- Numbers With Repeated Digits (Digit DP) --IMP --Revise
- Maximum Width of Binary Tree (Tree) --V.V IMP
- Evaluate Division (Graphs)
- Vowels of All Substrings --Concept
- Most Stones Removed with Same Row or Column (DSU)
- Largest Component Size by Common Factor (DSU + Number Theory) --Concept --IMP --Revise
- Queens That Can Attack the King
- Combination Sum IV (DP) --IMP --REVISE
- Maximum Alternating Subsequence Sum (DP) --IMP --REVISE
- Group Anagrams
- Least Number of Unique Integers after K Removals (Greedy) --Revise
- Maximum Score of a Good Subarray (Two Pointers) --Tricky Implementation
- Minimum Cost to Cut a Stick (DnC DP) --Tricy --Concept
- Minimum Time to Collect All Apples in a Tree (DFS) --Revise
- XOR Queries of a Subarray
- Count of Smaller Numbers After Self (Segment Tree) --IMP --REVISE
- Minimum Flips to Make a OR b Equal to c
- Maximum XOR for Each Query
- Find Duplicate Subtrees (Tree)
- Binary String With Substrings Representing 1 To N
- Is Graph Bipartite (Graphs)
- Champagne Tower (DP)
- Sort the Jumbled Numbers
- All Ancestors of a Node in a Directed Acyclic Graph (Graphs) --IMP --Revise
- Minimum Number of Moves to Make Palindrome (Two Pointers) --Hard --IMP -Revise
- Count Complete Tree Nodes (Tree) --Revise --IMP
- Remove Duplicates from Sorted List II (LinkedList)
- Longest Univalue Path (Tree DP)
- Insert Interval
- Copy List with Random Pointer --Tricky
- Next Greater Element II (Monotonic Stack) --IMP
- Next Greater Element III (Greedy) --IMP
- Minimum Insertion Steps to Make a String Palindrome (DP) -IMP
- Simplify Path (Stack)
- Word Break II (DP)
- HTML Entity Parser
- Maximum Width Ramp (TreeMap) --IMP --Revise
- Remove Max Number of Edges to Keep Graph Fully Traversable (2 DSU approach) --IMP --Revise
- Validate Stack Sequences (Stack)
- Score of Parentheses (Stack) Tough --Revise
- Find Two Non-overlapping Sub-arrays Each With Target Sum (Prefix Sum, Suffix Min) --CONCEPT --IMP --Hard
- Parsing A Boolean Expression (Stack)
- Remove Duplicate Letters (Monostack) --Tricky --IMP --Revise
- Reverse Integer
- Smallest Subsequence of Distinct Characters (Monostack)
- Evaluate the Bracket Pairs of a String (Stack)
- Binary Tree Right Side View (BFS)
- Maximum Frequency Stack (Stack + Design) --HARD --Revise
- Minimum Domino Rotations For Equal Row (Greedy) --Tricky --Revise
- 2 Keys Keyboard (DP)
- Simplified Fractions
- Smallest String With A Given Numeric Value (Greedy)
- Ways to Split Array Into Three Subarrays (Prefix Sum + Binary Search) --Tricky --Revise** --IMP
- Broken Calculator (Math)
- Boats to Save People (Two Pointers)
- Maximum Sum Circular Subarray (Kadane Algo) --IMP --Revise --Concept
- Total Hamming Distance (Bit Manip) --IMP --Revise
- Flatten Binary Tree to Linked List (Binary Tree) --IMP --TRICKY --HARD
- Design a Stack With Increment Operation
- Guess Number Higher or Lower II (DP) --Revise
- Minimum Deletions to Make Character Frequencies Unique (Greedy) --Revise --**IMP
- Continuous Subarray Sum (HashMap + Prefix Sum) --Logic similar to Subarray Sums Divisible by K
- 3Sum With Multiplicity (HashMap) --IMP --Revise
- Count Triplets That Can Form Two Arrays of Equal XOR (Prefix Xor) --CONCEPT --IMP --Revise
- Find the Longest Substring Containing Vowels in Even Counts (Bitmask + HashMap) --Concept
- Longest Word in Dictionary (Trie)
- LRU Cache (Double Linked List + HashMap) --Popular --Must Revise
- Game of Life
- Maximum Product After K Increments (Priority Queue)
- Find Players With Zero or One Losses
- Path Sum III (Subarray sum = k technique on Tree) --IMP
- Can I Win (Bitmask DP) --Tight Constraints
- Minimum Number of Operations to Reinitialize a Permutation
- Shortest Path to Get All Keys (BFS + Bitmask) --CONCEPT --Revise
- Groups of Special-Equivalent Strings (DSU + Implementation Heavy)
- Minimum Falling Path Sum II (Grid DP)
- Minimum Falling Path Sum (Grid DP)
- First Missing Positive --IMP --Revise --HARD
- Partition Array for Maximum Sum (DP)
- Minimum Sideway Jumps (DP)
- All Possible Full Binary Trees (DP) --Tricky --IMP
- Number of Ways to Stay in the Same Place After Some Steps (DP)
- Adding Spaces to a String
- Number of Smooth Descent Periods of a Stock (DP)
- Minimum Operations to Make the Array K-Increasing (Binary Search LIS variation) --CONCEPT --IMP --Tricky --Revise
- Allocate Mailboxes (DP) --Tough --Revise --Concept
- Best Sightseeing Pair (TreeSet/PriorityQueue/DP)
- Number of Ways to Split a String (Combinatorics + Prefix Sum) --IMP --Revise
- Minimum Cost to Connect Two Groups of Points (Bitmask DP) --Tricky Optimization --Tough
- Change Minimum Characters to Satisfy One of Three Conditions --IMP --Tricky Brute Force
- Path With Minimum Effort (Binary Search + DFS) --Concept
- Heaters (Binary Search)
- Most Profit Assigning Work (Greedy+Sorting) --Revise --IMP
- Ways to Make a Fair Array (Prefix Sum)
- Range Frequency Queries (Binary Search) --Revise --IMP --Concept
- Find the Minimum Number of Fibonacci Numbers Whose Sum Is K (Greedy) --Revise
- Minimum Average Difference (Prefix Sum)
- Count Unguarded Cells in the Grid (Simulation)
- Escape the Spreading Fire (Binary Search + Multi Source BFS) --CONCEPT --Implementation Heavy
- Count Number of Homogenous Substrings
- Shortest Unsorted Continuous Subarray (Prefix Max + Suffix Min) --CONCEPT
- Different Ways to Add Parentheses (DnC DP) --Revise --IMP
- Maximum Score From Removing Stones (PriorityQueue)
- All O`one Data Structure
- Word Subsets --IMP --REVISE --Tricky
- Number of Substrings Containing All Three Characters (Sliding Window) --IMP --Revise
- Longest Subarray of 1's After Deleting One Element
- Remove All Adjacent Duplicates in String II (Stack)
- Count Number of Nice Subarrays (Sliding Window) --IMP --REVISE --CONCEPT
- 132 Pattern (Prefix Min + TreeMap) --IMP --REVISE**
- Flatten Nested List Iterator (Recursion)
- Knight Probability in Chessboard (DP) --IMP
- Count Sorted Vowel Strings
- Permutations II (Backtracking) --IMP --REVISE
- Corporate Flight Bookings (Partial Sum)
- Shortest Path in Binary Matrix (BFS)
- Queries on Number of Points Inside a Circle (Brute Force)
- Rank Teams by Votes
- RLE Iterator
- Find Largest Value in Each Tree Row
- Making A Large Island (DSU)
- Delete Columns to Make Sorted II --Revise --Tricky
- Check if Number is a Sum of Powers of Three
- Maximum Bags With Full Capacity of Rocks
- Minimum Lines to Represent a Line Chart
- Sum of Total Strength of Wizards (Prefix Sum + Monotonic Stack) --IMP --HARD --Implementation Heavy
- Ones and Zeroes (DP)
- Minimize Malware Spread (DSU) --IMP --Revise
- Longest Valid Parathesis (Stack) --IMP --Revise --CONCEPT
- 4Sum (Two Pointers) --IMP --Revise
- Russian Doll Envelopes (Binary Search LIS) --V.IMP --Revise --Concept
- Letter Tile Possibilities (Backtacking)
- Flower Planting With No Adjacent (Graphs Coloring)
- Triples with Bitwise AND Equal To Zero (Brute Force)
- Minimum Area Rectangle (HashMap) --Revise --IMP
- Reorder List (LinkedList)
- Minimum Area Rectangle II (HashMap) --Revise --IMP
- Partition List (LinkedList)
- Rotate Image --IMP --Revise
- Number of Dice Rolls With Target Sum (DP)
- Maximum Length of a Concatenated String with Unique Characters (Backtracking)
- Minimum Number of Work Sessions to Finish the Tasks (Bitmask DP)
- Word Search II (Backtracking + Trie)
- Maximum Product of Word Lengths (Bitmask)
- Count Nodes Equal to Average of Subtree
- Maximum Absolute Sum of Any Subarray (Kadanes)
- Cutting Ribbons (Binary Search) (Premium Qs solved on binarysearch.com) --IMP --Revise
- Break a Palindrome (Greedy) --IMP --Revise
- Implement Trie (Prefix Tree) (Trie)
- Replace Words (Trie)
- Permutation Sequence (Greedy) --IMP --Revise
- Factorial Trailing Zeroes (Math) --IMP --Revise
- Sum Root to Leaf Numbers
- Spiral Matrix
- Set Matrix Zeroes --IMP --Tricky
- Number of Good Ways to Split a String (Prefix and Suffix)
- Restore The Array (DP)
- Single Element in a Sorted Array (Binary Search) --V. IMP --Revise --Tricky
- Lowest Common Ancestor of Deepest Leaves (Tree)
- Strange Printer (DP) --V. HARD
- Find Critical and Pseudo Critical Edges in Minimum Spanning Tree (Graphs) --CONCEPT --Revise
- Avoid Flood in The City (Binary Search/TreeSet) --IMP --Tricky --Revise
- Making File Names Unique
- Number of Subsequences That Satisfy the Given Sum Condition (Two Pointers)
- N-Queens (Backtracking)
- N-Queens II (Backtracking)
- Snakes and Ladders (BFS) --TRICKY
- Minimum Window Substring (Sliding Window) --V.IMP --Revise --Popular
- Cheapest Flights Within K Stops (Graphs) --IMP --Revise
- Online Election (TreeMap)
- Cat and Mouse II (Game Theory DP)
- Insert Delete GetRandom O(1) - Duplicates allowed (Design) --Revise --IMP
- Largest Values From Labels (Greedy)
- Reorder Routes to Make All Paths Lead to the City Zero (Graphs)
- Minimize Malware Spread II (Graphs+DSU) --Revise
- Checking Existence of Edge Length Limited Paths ( Graphs MST + Sorting)
- Loud and Rich (Graphs/DFS)
- Minimum Cost Tree From Leaf Values (DP) --IMP --Revise
- Regular Expression Matching (DP) --IMP --REVISE
- Sum of Beauty in the Array (PrefixMin + Suffix Max)
- Partition Array into Disjoint Intervals (PrefMin + Suffix Max)
- Design Front Middle Back Queue (Deque Design)
- Time Based Key-Value Store (Binary Search)
- Find Median from Data Stream (Priority Queue) --V.IMP* --Revise
- Sliding Window Median (2 TreeSets) --V.IMP --Revise
- Longest String Chain (LIS DP)
- Longest Happy String (Greedy/ PriorityQueue) --V.IMP --Revise
- Boundary of Binary Tree (Tree) (Solved on LintCode) --IMP --Revise
- Construct Binary Tree from Inorder and Postorder Traversal (Tree / DnC) --REVISE --V.IMP
- Construct Binary Tree from Preorder and Inorder Traversal (Tree / DnC) --REVISE --V.IMP
- Count and Say (DP / Simulation)
- Construct Binary Search Tree from Preorder Traversal (Tree / DnC) --REVISE --V.IMP
- Restore IP Addresses (Backtracking)
- Largest BST Subtree (Tree) (Solved on binarysearch.com) --IMP --Revise
- Binary Tree Cameras (Tree DP) --HARD --REVISE
- Lexicographically Smallest Equivalent String (DSU) (Solved on binarysearch.com as String Equivalence Relations)
- Prefix and Suffix Search (Trie) --CONCEPT --IMP
- Search a 2D Matrix II (Matrix) --V.IMP --Revise
- Kth Largest Element in an Array (QuickSelect) --IMP --Revise
- Search Suggestions System (Trie) --Revise
- Maximum Number of Events That Can Be Attended (Sweep Line) --Tricky --V.IMP
- Maximum Number of Events That Can Be Attended II (Binary Search + DP)
- Course Schedule III (Greedy) --Concept --HARD
- Course Schedule IV (Graphs)
- Fruit Into Baskets (Sliding Window)
- Delete Nodes And Return Forest (Tree)
- Reverse Pairs (Merge Sort)
- Number of Longest Increasing Subsequence (DP) --V. IMP Revise
- Random Pick with Weight (Randomized Algo -- Binary Search) --IMP --Revise
- Serialize and Deserialize Binary Tree (BFS)
- Parallel Courses II (Bitmask DP) --HARD
- Longest Subarray of 1's After Deleting One Element (Prefix/SUffix Processing)
- Largest Number (Sorting with Custom Comparator)
- Maximum Score Of Spliced Array (Prefix Sum) --IMP --REVISE
- Pacific Atlantic Water Flow (Graphs)
- Stock Price Fluctuation (TreeMap)
- Minimum Difference Between Largest and Smallest Value in Three Moves (Greedy) --IMP --**REVISE
- Asteroid Collision (Stack) --Tricky Edge cases
- Count Square Submatrices with All Ones (DP)
- Odd Even Jump (DP + TreeMap) --IMP --Revise
- Queue Reconstruction by Height (Sorting) --Tricky
- Number of Submatrices That Sum to Target (Prefix Sum + HashMap)
- Minimum Moves to Equal Array Elements II (Median)
- Last Moment Before All Ants Fall Out of a Plank --CONCEPT
- Count Submatrices With All Ones (DP) --HARD --TRICKY
- Bulls and Cows
- Single Number III (Bit Manipulation)
- Maximum Gap (Bucket Approach) --CONCEPT --HARD
- Longest Arithmetic Subsequence (LIS Type DP)
- Vertical Order Traversal of a Binary Tree (DFS + HashMap)
- Sum of Square Numbers (Math)
- Maximum Product of Splitted Binary Tree (Tree DP)
- Spiral Matrix IV
- Number of People Aware of a Secret (DP) --HARD
- Number of Increasing Paths in a Grid (DP)
- Queries on a Permutation With Key (Fenwick Tree) --CONCEPT --IMP
- Domino and Tromino Tiling (DP) --IMP
- Shifting Letters
- Minimum Time to Make Rope Colorful (Greedy)
- Interleaving String (DP)
- Minimum Possible Integer After at Most K Adjacent Swaps On Digits (Fenwick Tree + Greedy) --IMP --REVISE
- Online Majority Element In Subarray (Segment Tree) --CONCEPT --REVISE
- Design Circular Deque (Design) --IMP --Popular --Revise
- Paint house III (DP)
- Minimum Numbers of Function Calls to Make Target Array (Math/ Bit Manipulation)
- Smallest Number in Infinite Set
- Move Pieces to Obtain a String (Prefix Sum)
- Jump Game VI (DP + Monotonic Queue) --CONCEPT --Tricky
- Find Smallest Common Element in All Rows (TreeMap+HashSet) (Solved on binarysearch.com)
- Maximum of Minimum Values in All Subarrays (MonoStack + Suffix Max) (Solved on GFG) --HARD --CONCEPT
- 01 Matrix (Multi-Source BFS)
- Push Dominoes (Two Pointer) --IMP
- Non-negative Integers without Consecutive Ones (Digit DP)
- Count Unique Characters of All Substrings of a Given String --IMP
- Kth Smallest Element in a Sorted Matrix (Binary Search and other approaches) --POPULAR --IMP --REVISE
- Number of Nodes in the Sub-Tree With the Same Label
- Minimum Number of Swaps to Make the Binary String Alternating --IMP
- Check Completeness of a Binary Tree (BFS) --IMP
- Even Odd Tree (BFS)
- Number of Good Leaf Nodes Pairs (Tree)
- Minimum Suffix Flips
- String Compression II (DP) --HARD --Runtime Strict**
- Selling Pieces of Wood (DP) --IMP
- Maximize the Confusion of an Exam (Sliding Window)
- Lexicographical Numbers (Backtracking)
- Find the Winner of an Array Game (Simulation)
- Max Sum of a Pair With Equal Sum of Digits
- Query Kth Smallest Trimmed Number
- Minimum Deletions to Make Array Divisible (GCD + Sorting)
- Count of Range Sum (Fenwick Tree + Binary Search)
- Minimum Swaps to Arrange a Binary Grid (Greedy) --IMP --REVISE
- Get the Maximum Score (DP) --IMP
- Find Kth Bit in Nth Binary String
- Maximum Number of Non-Overlapping Subarrays With Sum Equals Target (Prefix Sum) (DP) (Greedy) --IMP
- Recover Binary Search Tree (BST) --IMP --POPULAR
- Can Convert String in K Moves (Greedy) --IMP
- Count Substrings That Differ by One Character (Counting Problem) --IMP --CONCEPT
- Minimum Insertions to Balance a Parentheses String (Stack) --HARD --TRICKY
- Minimum Add to Make Parentheses Valid (Stack)
- Find Longest Awesome Substring (Prefix Bitmask) --CONCEPT --IMP
- Maximum Side Length of a Square with Sum Less than or Equal to Threshold (Sliding Window) (2D Prefix Sum + Binary Search)
- Design Circular Queue
- Sliding Puzzle (BFS) --IMPLEMENTATION HEAVY
- Magnetic Force Between Two Balls (Binary Search) --IMP
- Minimum Number of Days to Eat N Oranges (DP) --Tricky --Math
- Reverse Linked List II
- Find Latest Group of Size M (DSU) --Tricky --Unable to Implement without WA
- Detect Cycles in 2D Grid (DSU)
- Minimum Number of Days to Disconnect Island (DSU) --Observation Based
- Number of Ways to Reorder Array to Get Same BST (Divide And Conquer) --CONCEPT --IMP --Revise
- Number of Ways Where Square of Number Is Equal to Product of Two Numbers (Counting)
- Find and Replace Pattern (HashMap)
- Shortest Subarray to be Removed to Make Array Sorted (Two Pointer) --TRICKY --HARD
- Count All Possible Routes (DP)
- Count Unhappy Friends (Brute Force) --Bad problem
- Check If String Is Transformable With Substring Sort Operations (Greedy) --IMP
- Maximum Product Subarray (DP) --IMP --REVISE
- Maximum Non Negative Product in a Matrix (DP) --IMP --REVISE
- Split a String Into the Max Number of Unique Substrings (Backtracking)
- Last Stone Weight II (DP) --Revise --V.IMP
- My Calendar I (TreeMap/ Binary Search) --IMP --Revise
- Strange Printer II (Topological Sort/ Check for DAG) --Tough To Come up With --Revise
- Make Sum Divisible by P
- Maximum Profit of Operating a Centennial Wheel
- Throne Inheritance (Design)
- Maximum Number of Achievable Transfer Requests (Bitmask) --IMP
- Number of Different Subsequences GCDs (Math) --TRICKY --REVISE --CONCEPT
- Maximum Number of Visible Points (Sliding Window + Geometry) --IMP --TRICKY --CONCEPT
- Minimum One Bit Operations to Make Integers Zero (Bit Manipulation + DP) --HARD --TRICKY
- Find Valid Matrix Given Row and Column Sums --Tricky
- Alert Using Same Key-Card Three or More Times in a One Hour Period
- Find Servers That Handled Most Number of Requests (TreeSet/BinarySearch + SweepLine) --REVISE --CONCEPT
- Number of Times Binary String Is Prefix_Aligned --REVISE --TRICKY --IMP
- Node With Highest Edge Score (Graphs)
- Construct Smallest Number From DI String (Two Pointer + Greedy) --IMP
- Count Special Integers ( Digit DP + Bitmask) --REVISE
- Split Two Strings to Make Palindrome (Greedy) --IMP --REVISE --CONCEPT
- Count Subtrees With Max Distance Between Cities (Graph + Bitmask) --IMP
- Best Team With No Conflicts (DP) --IMP --Revise
- Lexicographically Smallest String After Applying Operations (Brute Force)
- Watering Plants II
- Split Array into Consecutive Subsequences (Greedy + PriorityQueue) --IMP --Revise --Tricky
- Find Peak Element (Binary Search)
- Fancy Sequence (Linear Functions) --V. V. HARD --CONCEPT
- Coordinate With Maximum Network Quality (Brute Force)
- Number of Sets of K Non-Overlapping Line Segments (DP) --Revise
- Minimum Number of Refueling Stops (Greedy/PQ) --Revise --V. IMP
- Stamping The Sequence ( Greedy) --TOUGH --HEAVY GREEDY
- Unique Paths III (Bitmask)
- Accounts Merge
- Maximum Sum BST in Binary Tree --V.IMP --REVISE
- Count Nice Pairs in an Array
- Unique Binary Search Trees (DnC DP)
- Sort the Matrix Diagonally (Count Sort)
- Kth Smallest Instructions (Greedy) --IMP --Revise
- Number of Ways to Form a Target String Given a Dictionary (DP) --IMP --Revise
- Shuffle an Array (Randomized Algo - Fisher Yates Shuffle Algorithm) --V.V.IMP
- Strictly Palindromic Number
- Maximum Rows Covered by Columns (Bitmask)
- Maximum Number of Robots Within Budget (MonoQueue + Binary Search) --**V.IMP --Revise
- Longest Nice Subarray (Sliding Window) --Revise
- Number of Ways to Reach a Position After Exactly k Steps (DP)
- Subarray With Elements Greater Than Varying Threshold (MonoStack) --Tricky --V IMP
- The Number of Weak Characters in the Game (Sorting + Two Pointer + SuffixMax)
- Longest Chunked Palindrome Decomposition (String Hashing) --TOUGH --Implementation Heavy
- Longest Duplicate Substring (String Hashing + Binary Search) --V.IMP
- Repeated DNA Sequences
- Distinct Echo Substrings (String Hashing)
- Maximum Length of Repeated Subarray (String Hashing + Binary Search)
- Optimal Partition of String (Greedy)
- Divide Intervals Into Minimum Number of Groups (SweepLine / PQ)
- Longest Increasing Subsequence II (DP + Segment Tree) --IMP --CONCEPT
- Bag of Tokens (Greedy + Two Pointer)
- Pseudo-Palindromic Paths in a Binary Tree
- Product of the Last K Numbers (Prefix Products) --CONCEPT --REVISE
- Number of Ways to Wear Different Hats to Each Other (Bitmask DP) --Tricky --CONCEPT
- Find Original Array From Doubled Array (Sorting + Two Pointer) --IMP
- Palindrome Pairs --Implementation Heavy --Tight Constraint
- Length of the Longest Alphabetical Continuous Substring
- Reverse Odd Levels of Binary Tree (Tree)
- Sum of Prefix Scores of Strings (Trie)
- Find Duplicate File in System
- Longest Subarray With Maximum Bitwise AND
- Find All Good Indices (Prefix/Suffix)
- Number of Good Paths (DSU+Sorting) --CONCEPT --IMP
- Longest Arithmetic Subsequence of Given Difference (DP)
- Maximum Sum of an Hourglass
- Minimize XOR (Bit Manipulation + Greedy)
- Maximum Deletions on a String (String Hashing + DP) --IMP
- Longest Uploaded Prefix
- Bitwise XOR of All Pairings (Bit Manipulation)
- Number of Pairs Satisfying Inequality (Fenwick Tree) --IMP --Revise
- Erect The Fence ( Geometry - Convex Hull) --IMP --Revise
- Binary Search Tree to Greater Sum Tree (Tree)
- Reaching Points (Greedy + Math) --IMP CONCEPT --HARD --Tricky
- Find the Index of the First Occurrence in a String
- Delete the Middle Node of a Linked List
- Count Number of Distinct Integers After Reverse Operations
- Sum of Number and Its Reverse
- Count Subarrays With Fixed Bounds (Sliding Window) --CONCEPT --HARD
- Minimum Difficulty of a Job Schedule (DP)
- Top K Frequent Words (Min Heap)
- Contains Duplicate III (Binary Seach/ TreeMap) --IMP
- Image Overlap --IMP --CONCEPT
- Single-Threaded CPU (Greedy) --V.IMP
- Find XOR Sum of All Pairs Bitwise AND (Bit manipulation) --CONCEPT --IMP
- Max Points on a Line (Geometry)
- Words Within Two Edits of Dictionary
- Destroy Sequential Targets
- Next Greater Element IV (Monotstack + Binary Search + Segment Tree) --CONCEPT* --IMP
- Most Popular Video Creator
- Minimum Addition to Make Integer Beautiful (Greedy) --IMP --REVISE
- Height of Binary Tree After Subtree Removal Queries (Euler Tour + Tree DP + Prefix Suffix) --V.V.IMP
- Where Will the Ball Fall
- Implement Magic Dictionary (Trie)
- Minimum Genetic Mutation (BFS)
- Orderly Queue (Greedy)
- Maximum Sum of Distinct Subarrays With Length K (Fixed Sling Window)
- Total Cost to Hire K Workers (Greedy) --IMP
- Minimum Total Distance Traveled (DP)
- Online Stock Span (MonoStack) --IMP --REVISE
- Valid Sudoku --IMP
- Odd Even Linked List
- Reconstruct Itinerary (Euler Path of Graph) --V.IMP --REVISE
- Minimum Rounds to Complete All Tasks (Math) ---Revise
- Powerful Integers (Brute Force + Math)
- Maximal Score After Applying K Operations
- Make Number of Distinct Characters Equal
- As Far from Land as Possible (Multi Source BFS) --IMP --REVISE
- Maximize Score After N Operations (Bitmask DP)
- Longest Path With Different Adjacent Characters (Tree DP) --IMP
- Longest Well-Performing Interval (Prefix Sum) --V.IMP --*Tricky
- Count the Number of Good Subarrays (Sliding Window) --V.IMP --Concept
- Number of Valid Words for Each Puzzle (Bitmask/Submask Enumeration) --V.IMP --CONCEPT
- Flip String to Monotone Increasing (DP)
- Get Equal Substrings Within Budget (Binary Search + Fixed SLiding Window)
- Apply Bitwise Operations to Make Strings Equal (Bit Operations Observation)
- Minimum Cost to Split an Array (DP + Preprocessing) --IMP --REVISE
- Find Closest Node to Given Two Nodes ( Graphs)
- Data Stream as Disjoint Intervals (Binary Search) --IMP --REVISE
- Freedom Trail (DP) --CONCEPT
- Count the Number of Fair Pairs (Sorting + Binary Search) --V.IMP -Revise*
- Substring XOR Queries (Bit Manipulation + Tricky Observation) --Revise --CONCEPT
- Subsequence With the Minimum Score (Prefix and Suffix) --IMP. CONCEPT
- Maximum Number of Consecutive Values You Can Make (Greedy/ Observation) --IMP --Tricky CONCEPT
- Subarrays with K Different Integers (Sliding Window) --IMP
- Pancake Sorting (Observation and Logic) --Observation
- Number of Ways to Divide a Long Corridor (Counting/ Math) --IMP
- Divide Array in Sets of K Consecutive Numbers (Greedy) --IMP
- Check Knight Tour Configuration
- The Number of Beautiful Subsets (Backtracking)
- Smallest Missing Non-negative Integer After Operations (Math) --V. IMP
- Design Underground System (Design)
- Maximum Value of K Coins From Piles (DP) --Concept
- Shortest Bridge (DFS + BFS) --IMP
- Put Marbles in Bags (Heaps/Greedy) --Tricky --Revise
- All Nodes Distance K in Binary Tree (Graphs) --IMP
- Find All Duplicates in an Array (Cycle Sort) --IMP --Concept --Revise
- Minimum Speed to Arrive on Time (Binary Search)
- Minimum Number of Removals to Make Mountain Array (DP) --IMP --Concept
- Dinner Plate Stacks (Stacks + TreeSet) --IMP --Revise
- Maximum Performance of a Team (Greedy) --V.IMP --Revise
RohanTrix/Competitive-Practice
My solutions of different Competitive Programming questions from different websites
Java