Amazon Coding Interview Questions: 914 Tagged Problems
914 coding problems tagged Amazon — 347 easy · 428 medium · 139 hard — with solutions in 13 languages. Plus a 4-week study plan by topic.
- Problems: 914
- By difficulty: 347 easy · 428 medium · 139 hard
- Languages: JavaScript, TypeScript, Python, Java, C++, C, C#, Go, Kotlin, Swift, Rust, PHP and Ruby
- Cost: Free on every plan; sign in to run and submit
914 problems the CodeKairo catalogue tags as commonly asked in Amazon's coding rounds — 347 easy, 428 medium and 139 hard — each judged by hidden tests in 13 languages. The most common topics among them are Arrays (552), Strings (238) and Math (185). Tagged for Amazon and no other company: Maximum Population Year, Minimum Subsequence in Non-Increasing Order and Find Lucky Integer in an Array. At 83% of the catalogue the tag is a broad net rather than a shortlist; the pattern below is the narrower place to start. CodeKairo's Amazon — SDE Online Assessment mock covers the Amazon SDE online assessment pattern: code debugging, then two coding problems, then logical reasoning, which are the three parts of the assessment that can be reproduced. The tag is the catalogue's own annotation of where a problem tends to come up — not a list published by Amazon, which CodeKairo is not affiliated with.
Amazon study plan by topic
40 of the 914 problems tagged Amazon over 4 weeks, about 18 h 5 min of solving, grouped by technique in the order they build on each other — Arrays, Strings, Hash Table and Counting and 24 more. It ends with the Amazon — SDE Online Assessment mock.
Week 1: Arrays, Strings, Hash Table +4
11 problems on Arrays, Strings, Hash Table, Counting, Math, Two Pointers and Sliding Window, easiest first within each topic.
- Shuffle the Array Easy
- Length of Last Word Easy
- Detect Capital Easy
- Jewels and Stones Easy
- Valid Anagram Easy
- Number of Good Pairs Easy
- Reverse Integer Medium
- Reverse String Easy
- Merge Strings Alternately Easy
- Minimum Difference Between Highest and Lowest of K Scores Easy
- Contains Duplicate II Easy
Week 2: Prefix Sum, Sorting, Counting Sort +5
11 problems on Prefix Sum, Sorting, Counting Sort, Binary Search, Stack, Queue, Monotonic Stack and Matrix, easiest first within each topic.
- Running Sum of 1d Array Easy
- Find Pivot Index Easy
- Largest Perimeter Triangle Easy
- Third Maximum Number Easy
- How Many Numbers Are Smaller Than the Current Number Easy
- Count Pairs Whose Sum is Less than Target Easy
- Minimum Common Value Easy
- Baseball Game Easy
- First Unique Character in a String Easy
- Number of Visible People in a Queue Hard
- Unique Paths II Medium
Week 3: Simulation, Enumeration, Greedy +6
12 problems on Simulation, Enumeration, Greedy, Heap, Bit Manipulation, Number Theory, Combinatorics, Graph and Breadth-First Search, easiest first within each topic.
- Concatenation of Array Easy
- Build Array from Permutation Easy
- Count Good Triplets Easy
- Maximum 69 Number Easy
- Integer to Roman Medium
- Ugly Number II Medium
- Counting Bits Easy
- Power of Two Easy
- Add Digits Easy
- Count Sorted Vowel Strings Medium
- Keys and Rooms Medium
- Word Ladder Hard
Week 4: Union Find, Dynamic Programming, Game Theory +1
6 problems on Union Find, Dynamic Programming, Game Theory and Brainteaser, easiest first within each topic.
- Surrounded Regions Medium
- Best Time to Buy and Sell Stock III Hard
- Distinct Subsequences Hard
- Palindrome Partitioning II Hard
- Stone Game III Hard
- Divisor Game Easy
Finally: the timed test
Sit the Amazon — SDE Online Assessment mock under the clock — the coding problems are only one part of the round.
Amazon test patterns
- Amazon — SDE Online Assessment pattern guide and timed mock
All problems tagged Amazon
Easy (347)
- Find the Original Typed String I String
- Special Array I Array
- Type of Triangle Array, Math, Sorting
- Find the Losers of the Circular Game Array, Hash Table, Simulation
- Form Smallest Number From Two Digit Arrays Array, Hash Table, Enumeration
- Delete Greatest Value in Each Row Array, Matrix, Sorting
- The Employee That Worked on the Longest Task Array
- Calculate Delayed Arrival Time Math
- Most Frequent Even Element Array, Hash Table, Counting
- Rearrange Characters to Make Target String Hash Table, String, Counting
- Number of Strings That Appear as Substrings in Word Array, String
- Circular Sentence String
- Number of Senior Citizens Array, String
- Find Words Containing Character Array, String
- Strong Password Checker II String
- Decode the Message Hash Table, String
- Count Prefixes of a Given String Array, String
- Count Asterisks String
- Existence of a Substring in a String and Its Reverse String, Hash Table
- Number of Changing Keys String
- Find the Encrypted String String, Simulation
- Count the Number of Incremovable Subarrays I Array, Two Pointers, Enumeration
- Modify the Matrix Array, Matrix
- Find the Power of K-Size Subarrays I Array, Sliding Window
- Number of Bit Changes to Make Two Integers Equal Bit Manipulation
- Find the XOR of Numbers Which Appear Twice Array, Hash Table, Bit Manipulation
- Apple Redistribution into Boxes Array, Greedy, Sorting
- Number of Beautiful Pairs Array, Hash Table, Math
- Check if Array is Good Array, Hash Table, Sorting
- Neither Minimum nor Maximum Array, Sorting
- Alternating Groups I Array, Sliding Window
- Distribute Elements Into Two Arrays I Array, Simulation
- Minimum Sum of Mountain Triplets I Array, Prefix Sum
- Find the Integer Added to Array I Array, Math
- Minimum Operations to Exceed Threshold Value I Array
- Kids With the Greatest Number of Candies Array
- Separate the Digits in an Array Array, Simulation
- Find the Child Who Has the Ball After K Seconds Math, Simulation
- Minimum Time Visiting All Points Array, Math, Geometry
- Split the Array Array, Hash Table, Counting
- Find Champion II Graph
- Find Champion I Array, Matrix, Graph
- Prime In Diagonal Array, Math, Matrix
- Matrix Similarity After Cyclic Shifts Array, Matrix, Simulation
- Maximum Difference by Remapping a Digit Math, Greedy
- Determine the Winner of a Bowling Game Array, Simulation
- Alternating Digit Sum Math
- Best Poker Hand Array, Hash Table, Counting
- Minimum Moves to Convert String String, Greedy
- Maximum Height of a Triangle Array, Greedy, Enumeration
- Minimum Amount of Time to Fill Cups Array, Greedy, Math
- Take Gifts From the Richest Pile Array, Heap, Simulation
- Sqrt(x) Math, Binary Search
- Kth Missing Positive Number Array, Binary Search
- Find Smallest Letter Greater Than Target Array, Binary Search
- Count Subarrays of Length Three With a Condition Array, Sliding Window
- Minimum Recolors to Get K Consecutive Black Blocks String, Sliding Window
- Defuse the Bomb Array, Sliding Window, Simulation
- Substrings of Size Three with Distinct Characters String, Hash Table, Sliding Window
- Find the K-Beauty of a Number Math, String, Sliding Window
- Maximum Sum Subarray of Size K Array, Sliding Window
- Shortest Word Distance Array, String, Two Pointers
- Find Indices With Index and Value Difference I Array, Two Pointers
- Pair With Given Difference Array, Two Pointers, Sorting
- Shortest Distance to Target String in a Circular Array Array, String, Two Pointers
- Intersection of Multiple Arrays Array, Hash Table, Counting
- DI String Match Array, Two Pointers, Greedy
- Two Sum Less Than K Array, Two Pointers, Sorting
- Find the Distance Value Between Two Arrays Array, Two Pointers, Binary Search
- Merge Two 2D Arrays by Summing Values Array, Two Pointers
- Binary Watch Bit Manipulation, Backtracking, Enumeration
- Smallest Number With All Set Bits Bit Manipulation, Math
- Shortest Subarray With OR at Least K I Bit Manipulation, Array, Sliding Window
- Maximum Strong Pair XOR I Bit Manipulation, Array, Trie
- Find the K-or of an Array Bit Manipulation, Array
- Count Total Number of Colored Cells Math, Simulation
- Construct the Rectangle Math, Number Theory
- Count Distinct Numbers on Board Math, Simulation, Number Theory
- Split With Minimum Sum Math, Greedy, Sorting
- Number of Distinct Averages Array, Hash Table, Two Pointers
- Counting Elements Hash Table, Array, Counting
- Largest Unique Number Hash Table, Array, Sorting
- Rings and Rods Hash Table, String, Bit Manipulation
- Find Words That Can Be Formed by Characters Hash Table, String, Counting
- Minimum Changes to Make Alternating Binary String String, Greedy
- Most Common Word String, Hash Table
- Check If String Is a Prefix of Array String, Array
- Valid Word Abbreviation String, Two Pointers
- Reverse String II String, Two Pointers
- Largest Substring Between Two Equal Characters String, Hash Table
- Count Pairs With Given Sum Array, Hash Table
- Sort the People Array, Sorting, Hash Table
- Common Elements in Three Sorted Arrays Array, Two Pointers
- Convert Array Into Zig-Zag Fashion Array, Greedy
- Wave Array Array, Sorting
- Find the Distinct Difference Array Array, Hash Table, Prefix Sum
- Maximum Ascending Subarray Sum Array
- Find the Difference of Two Arrays Array, Hash Table
- Largest Positive Integer That Exists With Its Negative Array, Hash Table, Two Pointers
- Maximum Number of Pairs in Array Array, Hash Table, Counting
- Rank Transform of an Array Array, Hash Table, Sorting
- N-Repeated Element in Size 2N Array Array, Hash Table
- Find Common Characters Array, String, Hash Table
- Keyboard Row Array, String, Hash Table
- Minimum Index Sum of Two Lists Array, String, Hash Table
- Count Elements With Maximum Frequency Array, Hash Table, Counting
- Sum of Unique Elements Array, Hash Table, Counting
- Unique Number of Occurrences Array, Hash Table
- Count the Digits That Divide a Number Math
- Number of Common Factors Math, Number Theory, Enumeration
- Smallest Even Multiple Math, Number Theory
- Count Symmetric Integers Math, Enumeration
- Remove Trailing Zeros From a String String
- Maximum Odd Binary Number String, Greedy
- Points That Intersect With Cars Array, Prefix Sum
- Minimum Right Shifts to Sort the Array Array
- Distribute Money to Maximum Children Math, Greedy
- Count Tested Devices After Test Operations Array, Simulation, Counting
- Ant on the Boundary Array, Prefix Sum, Simulation
- Find the Maximum Achievable Number Math
- Find the Winning Player in Coin Game Math, Game Theory
- Furthest Point From Origin String, Greedy
- Account Balance After Rounded Purchase Math
- Divisible and Non-Divisible Sums Difference Math
- Number of Employees Who Met the Target Array
- Largest Odd Number in String String, Math, Greedy
- Check If It Is a Straight Line Array, Math, Geometry
- Maximum Number of Balls in a Box Math, Hash Table, Counting
- Count Square Sum Triples Math, Enumeration
- Count Integers With Even Digit Sum Math, Simulation
- Sum of Digits in Base K Math
- Sum of Digits of String After Convert String, Simulation
- Three Divisors Math, Number Theory
- Minimum Sum of Four Digit Number After Splitting Digits Math, Greedy, Sorting
- Count of Matches in Tournament Math, Simulation
- Add to Array-Form of Integer Array, Math
- Permutation Difference between Two Strings String, Hash Table
- Split Strings by Separator Array, String
- Maximum Value of a String in an Array Array, String
- Odd String Difference Array, String, Hash Table
- First Letter to Appear Twice String, Hash Table
- Percentage of Letter in String String
- Largest 3-Same-Digit Number in String String
- Minimum Number of Operations to Convert Time String, Greedy
- Find First Palindromic String in the Array Array, String, Two Pointers
- Capitalize the Title String
- Check if All A's Appears Before All B's String
- Count Common Words With One Occurrence Array, String, Hash Table
- Score of a String String
- Longest Nice Substring String, Divide and Conquer
- Remove Palindromic Subsequences String, Two Pointers
- Redistribute Characters to Make All Strings Equal Array, String, Counting
- Maximum Number of Words You Can Type String, Hash Table
- Check If Word Equals Summation of Two Words String, Math
- Determine Color of a Chessboard Square Math, String
- Replace All Digits with Characters String
- Number of Different Integers in a String String, Hash Table
- Maximum Repeating Substring String
- Thousand Separator String
- Check If a Word Occurs As a Prefix of Any Word in a Sentence String
- Count Substrings with Only One Distinct Letter String, Math
- Remove Vowels from a String String
- Greatest Common Divisor of Strings String, Math
- Verifying an Alien Dictionary Array, String, Hash Table
- Goat Latin String
- Unique Morse Code Words Array, String, Hash Table
- Long Pressed Name String, Two Pointers
- Reverse Only Letters String, Two Pointers
- To Lower Case String
- Divide Array Into Equal Pairs Array, Hash Table, Bit Manipulation
- Count Equal and Divisible Pairs in an Array Array
- Count Operations to Obtain Zero Math, Simulation
- Maximum Difference Between Increasing Elements Array
- Maximum Population Year Array, Prefix Sum, Counting
- Minimum Distance to the Target Element Array
- Minimum Operations to Make the Array Increasing Array, Greedy
- Sign of the Product of an Array Array, Math
- Number of Students Doing Homework at a Given Time Array
- Check If All 1's Are at Least Length K Places Away Array
- Teemo Attacking Array, Simulation
- Minimum Subsequence in Non-Increasing Order Array, Greedy, Sorting
- Count Largest Group Math, Hash Table
- Find Lucky Integer in an Array Array, Hash Table, Counting
- Minimum Value to Get Positive Step by Step Sum Array, Prefix Sum
- Find N Unique Integers Sum up to Zero Array, Math
- Replace Elements with Greatest Element on Right Side Array
- Distribute Candies to People Array, Math, Simulation
- Duplicate Zeros Array, Two Pointers
- Partition Array Into Three Parts With Equal Sum Array, Greedy, Prefix Sum
- X of a Kind in a Deck of Cards Array, Math, Number Theory
- Fair Candy Swap Array, Hash Table
- Monotonic Array Array
- Leaders in an Array Array
- Count Odd Numbers in an Interval Range Math
- Water Bottles Math, Simulation
- Sum of All Subset XOR Totals Array, Math, Backtracking
- Count the Number of Consistent Strings Array, Hash Table, String
- Find the Difference Hash Table, String, Bit Manipulation
- Minimum Bit Flips to Convert Number Bit Manipulation
- Binary Number with Alternating Bits Bit Manipulation
- Decode XORed Array Array, Bit Manipulation
- XOR Operation in an Array Math, Bit Manipulation, Simulation
- Nim Game Math, Brainteaser, Game Theory
- Base 7 Math
- Convert a Number to Hexadecimal Math, Bit Manipulation
- Prime Number of Set Bits in Binary Representation Math, Bit Manipulation
- Binary Gap Bit Manipulation
- Number Complement Bit Manipulation
- Power of Four Math, Bit Manipulation, Recursion
- Hamming Distance Bit Manipulation
- Counting Bits Dynamic Programming, Bit Manipulation
- Number of 1 Bits Divide and Conquer, Bit Manipulation
- Minimum String Length After Removing Substrings String, Stack, Simulation
- Number of Students Unable to Eat Lunch Array, Stack, Queue
- Time Needed to Buy Tickets Array, Queue, Simulation
- Final Prices With a Special Discount in a Shop Array, Stack, Monotonic Stack
- Crawler Log Folder Array, String, Stack
- Make The String Great String, Stack
- Baseball Game Array, String, Stack
- Sort Even and Odd Indices Independently Array, Sorting
- Sort Integers by The Number of 1 Bits Array, Bit Manipulation, Sorting
- Maximum Product of Three Numbers Array, Math, Sorting
- Minimum Absolute Difference Array, Sorting
- Sort Array by Increasing Frequency Array, Hash Table, Sorting
- Maximum Score After Splitting a String String, Prefix Sum
- Smallest Range I Array, Math
- Largest Perimeter Triangle Array, Math, Greedy
- Sort Array By Parity II Array, Two Pointers, Sorting
- Minimum Cost to Move Chips to The Same Position Array, Math, Greedy
- Maximum Units on a Truck Array, Greedy, Sorting
- Assign Cookies Array, Two Pointers, Greedy
- Divisor Game Math, Dynamic Programming, Brainteaser
- Special Positions in a Binary Matrix Array, Matrix
- Projection Area of 3D Shapes Array, Math, Geometry
- Matrix Cells in Distance Order Array, Math, Matrix
- Find Winner on a Tic Tac Toe Game Array, Hash Table, Matrix
- Convert 1D Array Into 2D Array Array, Matrix, Simulation
- Cells with Odd Values in a Matrix Array, Math, Simulation
- Largest Local Values in a Matrix Array, Matrix
- Row With Maximum Ones Array, Matrix
- Check if Matrix Is X-Matrix Array, Matrix
- Determine Whether Matrix Can Be Obtained By Rotation Array, Matrix
- Pascal's Triangle II Array, Dynamic Programming
- Number of Equivalent Domino Pairs Array, Hash Table, Counting
- The K Weakest Rows in a Matrix Array, Binary Search, Sorting
- Shift 2D Grid Array, Matrix, Simulation
- Lucky Numbers in a Matrix Array, Matrix
- Count Negative Numbers in a Sorted Matrix Array, Binary Search, Matrix
- Image Smoother Array, Matrix
- Flipping an Image Array, Two Pointers, Matrix
- Reshape the Matrix Array, Matrix, Simulation
- Toeplitz Matrix Array, Matrix
- Maximum Count of Positive Integer and Negative Integer Array, Binary Search, Counting
- Number of Arithmetic Triplets Array, Hash Table, Two Pointers
- Difference Between Element Sum and Digit Sum of an Array Array, Math
- Left and Right Sum Differences Array, Prefix Sum
- Apply Operations to an Array Array, Two Pointers, Simulation
- Minimum Common Value Array, Hash Table, Two Pointers
- Count Pairs Whose Sum is Less than Target Array, Two Pointers, Binary Search
- Minimum Number of Moves to Seat Everyone Array, Greedy, Sorting
- Maximum Product Difference Between Two Pairs Array, Greedy, Sorting
- Rearrange Spaces Between Words String
- Special Array With X Elements Greater Than or Equal X Array, Binary Search, Sorting
- Count Good Triplets Array, Enumeration
- Three Consecutive Odds Array
- Maximum Product of Two Elements in an Array Array, Sorting, Heap
- Array Partition Array, Greedy, Sorting
- Minimum Difference Between Highest and Lowest of K Scores Array, Sliding Window, Sorting
- Check If N and Its Double Exist Array, Hash Table, Two Pointers
- Can Make Arithmetic Progression From Sequence Array, Sorting
- Shortest Distance to a Character Array, Two Pointers, String
- Reverse Prefix of Word Two Pointers, String, Stack
- Merge Strings Alternately Two Pointers, String
- Remove Element Array, Two Pointers
- Count Binary Substrings Two Pointers, String
- Check If Two String Arrays Are Equivalent Array, String
- Split a String in Balanced Strings String, Greedy, Counting
- Remove Outermost Parentheses String, Stack
- Determine if String Halves Are Alike String, Counting
- Maximum Number of Balloons Hash Table, String, Counting
- Unique Email Addresses Array, Hash Table, String
- Rotate String String, String Matching
- Buddy Strings Hash Table, String
- License Key Formatting String
- Number of Segments in a String String
- Sorting the Sentence String, Sorting
- Truncate Sentence Array, String
- Check if the Sentence Is Pangram Hash Table, String
- Maximum Nesting Depth of the Parentheses String, Stack
- Shuffle String Array, String
- Goal Parser Interpretation String
- Jewels and Stones Hash Table, String
- Defanging an IP Address String
- Longest Palindrome Hash Table, String, Greedy
- Repeated Substring Pattern String, String Matching
- Detect Capital String
- Length of Last Word String
- Ransom Note Hash Table, String, Counting
- First Unique Character in a String Hash Table, String, Queue
- Reverse Vowels of a String Two Pointers, String
- Reverse Words in a String III Two Pointers, String
- Relative Sort Array Array, Hash Table, Sorting
- Height Checker Array, Sorting, Counting Sort
- Sort Array By Parity Array, Two Pointers, Sorting
- Distribute Candies Array, Hash Table, Greedy
- Longest Harmonious Subsequence Array, Hash Table, Sorting
- Degree of an Array Array, Hash Table
- Can Place Flowers Array, Greedy
- Third Maximum Number Array, Sorting
- Max Consecutive Ones Array
- Sum of All Odd Length Subarrays Array, Math, Prefix Sum
- Find the Highest Altitude Array, Prefix Sum
- Create Target Array in the Given Order Array, Simulation
- Decompress Run-Length Encoded List Array, Simulation
- Concatenation of Array Array, Simulation
- Build Array from Permutation Array, Simulation
- Shuffle the Array Array
- Number of Good Pairs Array, Hash Table, Math
- How Many Numbers Are Smaller Than the Current Number Array, Hash Table, Counting Sort
- Running Sum of 1d Array Array, Prefix Sum
- Find Pivot Index Array, Prefix Sum
- Set Mismatch Array, Hash Table, Bit Manipulation
- Intersection of Two Arrays II Array, Hash Table, Two Pointers
- Intersection of Two Arrays Array, Hash Table, Two Pointers
- Contains Duplicate II Array, Hash Table, Sliding Window
- Maximum 69 Number Math, Greedy
- Find Numbers with Even Number of Digits Array, Math
- Subtract the Product and Sum of Digits of an Integer Math
- Number of Steps to Reduce a Number to Zero Math, Bit Manipulation
- Self Dividing Numbers Math
- Find Greatest Common Divisor of Array Array, Math, Number Theory
- Perfect Number Math
- N-th Tribonacci Number Math, Dynamic Programming, Memoization
- Fibonacci Number Math, Dynamic Programming, Recursion
- Add Strings Math, String, Simulation
- Plus One Array, Math
- Add Binary Math, String, Bit Manipulation
- Roman to Integer Hash Table, Math, String
- Excel Sheet Column Title Math, String
- Excel Sheet Column Number Math, String
- Power of Three Math, Recursion
- Power of Two Math, Bit Manipulation
- Add Digits Math, Simulation, Number Theory
- Ugly Number Math
- Happy Number Hash Table, Math, Two Pointers
- Valid Anagram Hash Table, String, Sorting
- Reverse String Two Pointers, String
Medium (428)
- Make Three Strings Equal String
- Minimum Number of Increments on Subarrays to Form a Target Array Array, Greedy, Dynamic Programming
- Find the Winner of an Array Game Array, Simulation
- Queries on a Permutation With Key Array, Binary Indexed Tree, Simulation
- Corporate Flight Bookings Array, Prefix Sum
- Find the Winner of the Circular Game Array, Math, Recursion
- Longest Subsequence With Limited Sum Array, Binary Search, Greedy
- Partition Array for Maximum Sum Array, Dynamic Programming
- Stone Game VII Array, Math, Dynamic Programming
- Minimum Number of Work Sessions to Finish the Tasks Array, Dynamic Programming, Bit Manipulation
- Count Fertile Pyramids in a Land Array, Dynamic Programming, Matrix
- Number of Ways to Divide a Long Corridor Math, String, Dynamic Programming
- Maximum Number of Non-overlapping Palindrome Substrings String, Dynamic Programming, Greedy
- Count Ways to Group Overlapping Ranges Array, Sorting, Math
- Count Number of Ways to Place Houses Math, Dynamic Programming
- Count Number of Texts Hash Table, Math, String
- Number of Ways to Reach a Position After Exactly k Steps Math, Dynamic Programming, Combinatorics
- Delete Characters to Make Fancy String String, Greedy
- Count Number of Homogenous Substrings Math, String
- Construct String With Repeat Limit Hash Table, String, Greedy
- Minimum Number of Steps to Make Two Strings Anagram II Hash Table, String, Counting
- Count Vowel Substrings of a String Hash Table, String, Sliding Window
- Longest Substring of All Vowels in Order String, Sliding Window
- Minimum Deletions to Make String Balanced String, Dynamic Programming, Stack
- Minimum Length of String After Operations Hash Table, String, Counting
- Minimum Number of Changes to Make Binary String Beautiful String, Greedy
- Lexicographically Minimum String After Removing Stars String, Greedy, Heap (Priority Queue)
- Count Substrings Starting and Ending with Given Character Math, String, Counting
- Sort Vowels in a String String, Sorting
- Find the Integer Added to Array II Array, Two Pointers, Sorting
- Minimum Operations to Exceed Threshold Value II Array, Heap (Priority Queue), Simulation
- Sum of Digit Differences of All Pairs Array, Hash Table, Math
- Alternating Groups II Array, Sliding Window
- Minimum Sum of Mountain Triplets II Array, Prefix Sum
- Count Days Without Meetings Array, Sorting
- Water Bottles II Math, Simulation
- Determine the Minimum Sum of a k-avoiding Array Array, Math, Greedy
- Find the Value of the Partition Array, Sorting
- Maximum Value of an Ordered Triplet II Array, Prefix Sum
- Process Tasks Using Servers Array, Simulation, Heap (Priority Queue)
- Maximum Number of Eaten Apples Array, Greedy, Heap (Priority Queue)
- K-th Smallest Prime Fraction Array, Binary Search, Sorting
- Find K Pairs with Smallest Sums Array, Heap (Priority Queue)
- Maximum Subsequence Score Array, Greedy, Sorting
- Total Cost to Hire K Workers Array, Two Pointers, Simulation
- Single-Threaded CPU Array, Sorting, Heap (Priority Queue)
- Most Beautiful Item for Each Query Array, Binary Search, Sorting
- Number of Orders in the Backlog Array, Simulation, Heap (Priority Queue)
- Maximum Number of Events That Can Be Attended Array, Greedy, Sorting
- The Number of the Smallest Unoccupied Chair Array, Hash Table, Heap (Priority Queue)
- Maximal Score After Applying K Operations Array, Greedy, Heap (Priority Queue)
- Find the Kth Largest Integer in the Array Array, String, Sorting
- Maximum Score From Removing Stones Math, Greedy, Heap (Priority Queue)
- Minimum Cost to Connect Sticks Array, Greedy, Heap (Priority Queue)
- Find the Safest Path in a Grid Array, Matrix, Binary Search
- Number of Ways to Arrive at Destination Graph, Dynamic Programming, Shortest Path
- Course Schedule IV Graph, Topological Sort, Depth-First Search
- Parallel Courses Graph, Topological Sort, Breadth-First Search
- Detonate the Maximum Bombs Array, Math, Graph
- The Maze II Array, Matrix, Graph
- Open the Lock Array, String, Breadth-First Search
- Loud and Rich Array, Graph, Topological Sort
- Shortest Path with Alternating Colors Graph, Breadth-First Search
- Number of Nodes in the Sub-Tree With the Same Label Hash Table, Tree, Graph
- Minimum Fuel Cost to Report to the Capital Tree, Graph, Depth-First Search
- Maximum Star Sum of a Graph Array, Graph, Greedy
- Count the Number of Complete Components Graph, Union Find, Depth-First Search
- Minimum Score of a Path Between Two Cities Graph, Union Find, Depth-First Search
- Reachable Nodes With Restrictions Array, Tree, Graph
- Largest Plus Sign Array, Matrix, Dynamic Programming
- Remove All Ones With Row and Column Flips Array, Matrix, Bit Manipulation
- Number of Corner Rectangles Array, Matrix, Math
- Magic Squares In Grid Array, Matrix, Simulation
- Maximum Number of Fish in a Grid Array, Matrix, Depth-First Search
- Construct Product Matrix Array, Matrix, Prefix Sum
- Maximum Number of Moves in a Grid Array, Matrix, Dynamic Programming
- Map of Highest Peak Array, Matrix, Breadth-First Search
- Convert an Array Into a 2D Array With Conditions Array, Matrix, Hash Table
- Check Knight Tour Configuration Array, Matrix, Depth-First Search
- First Completely Painted Row or Column Array, Matrix, Hash Table
- Rotating the Box Array, Matrix, Two Pointers
- Find All Groups of Farmland Array, Matrix, Depth-First Search
- Matrix Block Sum Array, Matrix, Prefix Sum
- Spiral Matrix III Array, Matrix, Simulation
- Where Will the Ball Fall Array, Matrix, Simulation
- Maximum Matrix Sum Array, Matrix, Greedy
- Difference Between Ones and Zeros in Row and Column Array, Matrix, Simulation
- Find the N-th Value After K Seconds Array, Math, Simulation
- Minimum Cost Tree From Leaf Values Array, Dynamic Programming, Stack
- The Number of Beautiful Subsets Array, Hash Table, Dynamic Programming
- Longest Binary Subsequence Less Than or Equal to K String, Greedy, Dynamic Programming
- Number of Ways to Select Buildings String, Dynamic Programming, Prefix Sum
- Number of People Aware of a Secret Queue, Dynamic Programming, Simulation
- Longest Ideal Subsequence Hash Table, String, Dynamic Programming
- Stone Game II Array, Dynamic Programming, Prefix Sum
- Predict the Winner Array, Dynamic Programming, Recursion
- Count Alternating Subarrays Array, Math, Dynamic Programming
- Count Ways To Build Good Strings Dynamic Programming
- Longest Arithmetic Subsequence Array, Hash Table, Dynamic Programming
- Coin Change II Array, Dynamic Programming
- Minimum Impossible OR Array, Bit Manipulation, Brainteaser
- Minimum Additions to Make Valid String String, Greedy, Dynamic Programming
- Partition String Into Substrings With Values at Most K String, Greedy, Dynamic Programming
- Stone Game IX Array, Math, Greedy
- Minimum Operations to Make Median of Array Equal to K Array, Greedy, Sorting
- Destroy Sequential Targets Array, Hash Table, Counting
- Smallest Missing Non-negative Integer After Operations Array, Hash Table, Math
- Separate Black and White Balls String, Greedy, Two Pointers
- Find the Maximum Number of Marked Indices Array, Two Pointers, Greedy
- Maximum Split of Positive Even Integers Math, Greedy
- Find Three Consecutive Integers That Sum to a Given Number Math, Simulation
- Maximum Consecutive Floors Without Special Floors Array, Sorting, Greedy
- Count Collisions on a Road String, Stack, Simulation
- Video Stitching Array, Greedy, Dynamic Programming
- Eliminate Maximum Number of Monsters Array, Greedy, Sorting
- Removing Minimum and Maximum From Array Array, Greedy
- Minimum Number of Operations to Move All Balls to Each Box Array, String, Prefix Sum
- Minimum Number of Arrows to Burst Balloons Array, Greedy, Sorting
- Maximum Number of Removable Characters Array, String, Binary Search
- Divide Chocolate Array, Binary Search, Greedy
- Successful Pairs of Spells and Potions Array, Binary Search, Sorting
- Search a 2D Matrix II Array, Matrix, Binary Search
- Find Right Interval Array, Binary Search, Sorting
- House Robber IV Array, Binary Search, Greedy
- Minimize the Maximum Difference of Pairs Array, Binary Search, Greedy
- Maximum Candies Allocated to K Children Array, Binary Search
- Peak Index in a Mountain Array Array, Binary Search
- H-Index II Array, Binary Search
- Find the Smallest Divisor Given a Threshold Array, Binary Search
- Maximum Value at a Given Index in a Bounded Array Binary Search, Greedy, Math
- Find the Student That Will Replace the Chalk Array, Binary Search, Prefix Sum
- Minimum Limit of Balls in a Bag Array, Binary Search
- Magnetic Force Between Two Balls Array, Binary Search, Sorting
- Minimum Number of Days to Make m Bouquets Array, Binary Search
- Capacity to Ship Packages Within D Days Array, Binary Search
- Find First and Last Position of Element in Sorted Array Array, Binary Search
- Find Minimum in Rotated Sorted Array II Array, Binary Search
- Search in Rotated Sorted Array II Array, Binary Search
- Minimum Consecutive Cards to Pick Up Array, Hash Table, Sliding Window
- Max Consecutive Ones II Array, Sliding Window, Dynamic Programming
- Minimum Swaps to Group All 1's Together II Array, Sliding Window
- Length of Longest Subarray With at Most K Frequency Array, Hash Table, Sliding Window
- Maximum Beauty of an Array After Applying Operation Array, Sliding Window, Sorting
- Count Complete Subarrays in an Array Array, Hash Table, Sliding Window
- Number of Subarrays with Bounded Maximum Array, Sliding Window, Two Pointers
- Count the Number of Good Subarrays Array, Hash Table, Sliding Window
- Swap For Longest Repeated Character Substring String, Sliding Window, Hash Table
- Replace the Substring for Balanced String String, Sliding Window, Two Pointers
- Get Equal Substrings Within Budget String, Sliding Window, Binary Search
- Maximize the Confusion of an Exam String, Sliding Window, Prefix Sum
- Frequency of the Most Frequent Element Array, Sliding Window, Greedy
- K Radius Subarray Averages Array, Sliding Window, Prefix Sum
- Maximum Points You Can Obtain from Cards Array, Sliding Window, Prefix Sum
- Grumpy Bookstore Owner Array, Sliding Window
- Number of Substrings Containing All Three Characters String, Hash Table, Sliding Window
- Longest Substring with At Most K Distinct Characters String, Hash Table, Sliding Window
- Longest Substring with At Most Two Distinct Characters String, Hash Table, Sliding Window
- Sentence Similarity III String, Two Pointers, Array
- Watering Plants II Array, Two Pointers, Simulation
- Number of Subsequences That Satisfy the Given Sum Condition Array, Two Pointers, Sorting
- The k Strongest Values in an Array Array, Two Pointers, Sorting
- 3Sum With Multiplicity Array, Hash Table, Two Pointers
- Most Profit Assigning Work Array, Two Pointers, Greedy
- Push Dominoes String, Two Pointers, Dynamic Programming
- Longest Mountain in Array Array, Two Pointers, Dynamic Programming
- Partition Array Such That Maximum Difference Is K Array, Greedy, Sorting
- Sort Transformed Array Array, Two Pointers, Math
- Bag of Tokens Array, Two Pointers, Greedy
- Max Number of K-Sum Pairs Array, Two Pointers, Hash Table
- 4Sum Array, Two Pointers, Sorting
- Maximum Distance Between a Pair of Values Array, Two Pointers, Binary Search
- Sum of Square Numbers Math, Two Pointers, Binary Search
- Maximum OR Bit Manipulation, Array, Greedy
- Minimum Array End Bit Manipulation, Greedy
- Number of Wonderful Substrings Bit Manipulation, Hash Table, String
- Bitwise ORs of Subarrays Bit Manipulation, Array, Dynamic Programming
- Find the Longest Substring Containing Vowels in Even Counts Bit Manipulation, Hash Table, String
- Longest Nice Subarray Bit Manipulation, Array, Sliding Window
- UTF-8 Validation Bit Manipulation, Array
- Maximum XOR for Each Query Bit Manipulation, Array, Prefix Sum
- Count Number of Maximum Bitwise-OR Subsets Bit Manipulation, Backtracking, Enumeration
- XOR Queries of a Subarray Bit Manipulation, Array, Prefix Sum
- Decode XORed Permutation Bit Manipulation, Array, Brainteaser
- Minimize XOR Bit Manipulation, Greedy
- Flip String to Monotone Increasing String, Dynamic Programming, Bit Manipulation
- Find the Xor-Beauty of Array Bit Manipulation, Array, Math
- Maximum XOR After Operations Bit Manipulation, Array, Brainteaser
- Longest Subarray With Maximum Bitwise AND Bit Manipulation, Array, Brainteaser
- Minimum Number of Operations to Make Array XOR Equal to K Bit Manipulation, Array
- Find The Original Array of Prefix Xor Bit Manipulation, Array, Prefix Sum
- Bitwise XOR of All Pairings Bit Manipulation, Array, Brainteaser
- Minimum Time to Repair Cars Array, Binary Search, Greedy
- Maximum Value of an Ordered Triplet I Array, Math, Prefix Sum
- Super Ugly Number Dynamic Programming, Math, Heap
- Minimum Moves to Reach Target Score Math, Greedy
- The kth Factor of n Math, Number Theory
- Integer Replacement Bit Manipulation, Greedy, Dynamic Programming
- Clumsy Factorial Math, Stack, Simulation
- Reordered Power of 2 Math, Counting, Enumeration
- Minimum Operations to Reduce an Integer to 0 Bit Manipulation, Greedy, Dynamic Programming
- Closest Divisors Math, Number Theory
- Maximum Product After K Increments Array, Greedy, Heap
- Prime Subtraction Operation Array, Math, Greedy
- Minimum Number of Operations to Make Array Empty Hash Table, Greedy, Counting
- Smallest Value After Replacing With Sum of Prime Factors Math, Number Theory, Simulation
- Number of Zero-Filled Subarrays Array, Math, Counting
- 4Sum II Hash Table, Array, Counting
- Find Players With Zero or One Losses Hash Table, Array, Sorting
- Minimum Area Rectangle Hash Table, Array, Geometry
- Number of Boomerangs Hash Table, Math, Array
- Group the People Given the Group Size They Belong To Hash Table, Array, Greedy
- Optimal Partition of String Hash Table, String, Greedy
- Count Number of Bad Pairs Hash Table, Array, Counting
- Determine if Two Strings Are Close Hash Table, String, Counting
- Equal Row and Column Pairs Hash Table, Matrix, Simulation
- Brick Wall Hash Table, Array, Counting
- Smallest String With Swaps Union Find, Hash Table, String
- Number of Pairs of Interchangeable Rectangles Array, Hash Table, Math
- Count Nice Pairs in an Array Array, Hash Table, Math
- Maximum Size Subarray Sum Equals k Array, Hash Table, Prefix Sum
- Longest Well-Performing Interval Array, Hash Table, Prefix Sum
- Subarray Sums Divisible by K Array, Hash Table, Prefix Sum
- Maximum Number of Integers to Choose From a Range I Hash Table, Greedy, Binary Search
- Short Encoding of Words String, Trie, Hash Table
- Replace Words String, Trie, Hash Table
- Longest Word in Dictionary String, Trie, Hash Table
- Word Subsets String, Hash Table, Counting
- Number of Good Ways to Split a String String, Hash Table, Prefix Sum
- Minimum Length of String After Deleting Similar Ends String, Two Pointers
- Can Convert String in K Moves String, Hash Table, Greedy
- Longest Substring With At Least K Repeating Characters String, Sliding Window, Divide and Conquer
- Maximum Number of Occurrences of a Substring String, Sliding Window, Hash Table
- Number of Ways to Split a String String, Math, Counting
- Minimum Number of Frogs Croaking String, Greedy, Counting
- Check If a String Can Break Another String String, Greedy, Sorting
- Count Substrings That Differ by One Character String, Dynamic Programming
- Maximum Length of a Concatenated String With Unique Characters String, Bit Manipulation, Backtracking
- Count Words Obtained After Adding a Letter String, Bit Manipulation, Hash Table
- Longest Word in Dictionary Through Deleting String, Two Pointers, Sorting
- Number of Matching Subsequences String, Two Pointers, Binary Search
- Find and Replace Pattern String, Hash Table
- Count Triplets With Sum Smaller Than X Array, Two Pointers, Sorting
- Kth Smallest Element Array, Sorting, Quickselect
- Maximum Index Array, Two Pointers
- Rearrange Array in Max/Min Form Array, Two Pointers
- Subarray With Given Sum Array, Sliding Window, Two Pointers
- Longest Subarray With Sum Zero Array, Hash Table, Prefix Sum
- Minimum Swaps to Sort Array, Sorting, Graph
- Count Inversions Array, Divide and Conquer, Fenwick Tree
- Divide Array Into Arrays With Max Difference Array, Greedy, Sorting
- Count Number of Teams Array, Dynamic Programming
- Uncrossed Lines Array, Dynamic Programming
- Minimum ASCII Delete Sum for Two Strings String, Dynamic Programming
- Longest Palindromic Subsequence String, Dynamic Programming
- Unique Binary Search Trees Dynamic Programming, Math
- Domino and Tromino Tiling Dynamic Programming
- Paint House Array, Dynamic Programming
- Paint Fence Dynamic Programming
- Minimum Operations to Make Array Equal Math
- Reach a Number Math, Binary Search
- Smallest Value of the Rearranged Number Math, Sorting
- Check if Number is a Sum of Powers of Three Math, Number Theory
- Number of Steps to Reduce a Number in Binary Representation to One String, Bit Manipulation, Simulation
- Find Original Array From Doubled Array Array, Greedy, Sorting
- K-diff Pairs in an Array Array, Hash Table
- Non-decreasing Array Array, Greedy
- Minimum Moves to Equal Array Elements II Array, Math, Sorting
- Minimum Moves to Equal Array Elements Array, Math
- Word Search Array, String, Backtracking
- Pacific Atlantic Water Flow Array, Depth-First Search, Breadth-First Search
- Snakes and Ladders Array, Breadth-First Search, Matrix
- Minimum Genetic Mutation Hash Table, String, Breadth-First Search
- Jump Game III Array, Depth-First Search, Breadth-First Search
- Count Unreachable Pairs of Nodes in an Undirected Graph Depth-First Search, Breadth-First Search, Union Find
- Maximum Total Importance of Roads Graph, Greedy, Sorting
- Find Closest Node to Given Two Nodes Depth-First Search, Graph
- Maximal Network Rank Graph
- Path With Minimum Effort Array, Binary Search, Depth-First Search
- Time Needed to Inform All Employees Tree, Depth-First Search, Breadth-First Search
- Reorder Routes to Make All Paths Lead to the City Zero Depth-First Search, Breadth-First Search, Graph
- Possible Bipartition Depth-First Search, Breadth-First Search, Union Find
- Minimum Height Trees Depth-First Search, Breadth-First Search, Graph
- Detect Cycles in 2D Grid Array, Depth-First Search, Breadth-First Search
- Number of Distinct Islands Array, Hash Table, Depth-First Search
- Shortest Bridge Array, Depth-First Search, Breadth-First Search
- The Earliest Moment When Everyone Become Friends Array, Union Find, Sorting
- Number of Operations to Make Network Connected Depth-First Search, Breadth-First Search, Union Find
- Count Sub Islands Array, Depth-First Search, Breadth-First Search
- As Far from Land as Possible Array, Dynamic Programming, Breadth-First Search
- Shortest Path in Binary Matrix Array, Breadth-First Search, Matrix
- Number of Enclaves Array, Depth-First Search, Breadth-First Search
- Minimum Number of Vertices to Reach All Nodes Graph
- Find Eventual Safe States Depth-First Search, Breadth-First Search, Graph
- All Paths From Source to Target Backtracking, Depth-First Search, Breadth-First Search
- Keys and Rooms Depth-First Search, Breadth-First Search, Graph
- Is Graph Bipartite? Depth-First Search, Breadth-First Search, Union Find
- Graph Valid Tree Depth-First Search, Breadth-First Search, Union Find
- Number of Connected Components in an Undirected Graph Depth-First Search, Breadth-First Search, Union Find
- Rotate Function Array, Math, Dynamic Programming
- Nth Digit Math, Binary Search
- Bulb Switcher Math, Brainteaser
- Count Triplets That Can Form Two Arrays of Equal XOR Array, Hash Table, Math
- Divide Two Integers Math, Bit Manipulation
- Concatenation of Consecutive Binary Numbers Math, Bit Manipulation, Simulation
- Maximum Product of Word Lengths Array, String, Bit Manipulation
- Sort Integers by The Power Value Dynamic Programming, Memoization, Sorting
- Minimum Flips to Make a OR b Equal to c Bit Manipulation
- Gray Code Math, Backtracking, Bit Manipulation
- Maximum XOR of Two Numbers in an Array Array, Hash Table, Bit Manipulation
- Sum of Two Integers Math, Bit Manipulation
- Bitwise AND of Numbers Range Bit Manipulation
- Total Hamming Distance Array, Math, Bit Manipulation
- Single Number III Array, Bit Manipulation
- Single Number II Array, Bit Manipulation
- Buildings With an Ocean View Array, Stack, Monotonic Stack
- Minimum Insertions to Balance a Parentheses String String, Stack, Greedy
- Remove All Adjacent Duplicates in String II String, Stack
- The Number of Weak Characters in the Game Array, Greedy, Sorting
- Maximum Score From Removing Substrings String, Stack, Greedy
- Minimum Number of Swaps to Make the String Balanced String, Stack, Greedy
- Remove All Occurrences of a Substring String, Stack, Simulation
- Max Chunks To Make Sorted Array, Stack, Greedy
- Sum of Subarray Ranges Array, Stack, Monotonic Stack
- Removing Stars From a String String, Stack, Simulation
- Dota2 Senate String, Greedy, Queue
- Reveal Cards In Increasing Order Array, Queue, Sorting
- Reverse Substrings Between Each Pair of Parentheses String, Stack
- Basic Calculator II Math, String, Stack
- Validate Stack Sequences Array, Stack, Simulation
- Next Greater Element III Math, Two Pointers, String
- Maximum Width Ramp Array, Stack, Monotonic Stack
- 132 Pattern Array, Binary Search, Stack
- Sum of Subarray Minimums Array, Dynamic Programming, Stack
- Build an Array With Stack Operations Array, Stack, Simulation
- Check If Word Is Valid After Substitutions String, Stack
- Score of Parentheses String, Stack
- Minimum Remove to Make Valid Parentheses String, Stack
- Minimum Add to Make Parentheses Valid String, Stack, Greedy
- Minimum Number of Platforms Array, Greedy, Sorting
- Find K Closest Elements Array, Two Pointers, Binary Search
- Kth Smallest Element in a Sorted Matrix Array, Binary Search, Sorting
- Top K Frequent Words Array, Hash Table, String
- K Closest Points to Origin Array, Math, Divide and Conquer
- Partition Array into Disjoint Intervals Array, Greedy
- Minimum Time to Make Rope Colorful Array, String, Dynamic Programming
- Remove Duplicate Letters String, Stack, Greedy
- Monotone Increasing Digits Math, Greedy
- Maximum Swap Math, Greedy
- Valid Triangle Number Array, Two Pointers, Binary Search
- Rearrange Array Elements by Sign Array, Two Pointers, Simulation
- Maximum Number of Coins You Can Get Array, Math, Greedy
- Largest Number Array, String, Greedy
- Maximum Ice Cream Bars Array, Greedy, Sorting
- Remove Covered Intervals Array, Greedy, Sorting
- Minimum Number of Steps to Make Two Strings Anagram Hash Table, String, Counting
- Minimum Deletions to Make Character Frequencies Unique String, Hash Table, Greedy
- Reduce Array Size to The Half Array, Hash Table, Greedy
- Queue Reconstruction by Height Array, Greedy, Sorting
- Two City Scheduling Array, Greedy, Sorting
- Knight Dialer Dynamic Programming
- 2 Keys Keyboard Math, Dynamic Programming
- Maximum Length of Pair Chain Array, Dynamic Programming, Greedy
- Longest Turbulent Subarray Array, Dynamic Programming, Sliding Window
- Number of Dice Rolls With Target Sum Dynamic Programming
- Best Sightseeing Pair Array, Dynamic Programming
- Maximum Sum Circular Subarray Array, Divide and Conquer, Dynamic Programming
- Minimum Cost For Tickets Array, Dynamic Programming
- Longest String Chain Array, Hash Table, Two Pointers
- Combination Sum IV Array, Dynamic Programming
- Ones and Zeroes Array, String, Dynamic Programming
- Last Stone Weight II Array, Dynamic Programming
- Stone Game Array, Math, Dynamic Programming
- Count Numbers with Unique Digits Math, Dynamic Programming, Backtracking
- Ugly Number II Hash Table, Math, Dynamic Programming
- Integer Break Math, Dynamic Programming
- Perfect Squares Math, Dynamic Programming, Breadth-First Search
- Triangle Array, Dynamic Programming
- Minimum Falling Path Sum Array, Dynamic Programming, Matrix
- Interleaving String String, Dynamic Programming
- Delete Operation for Two Strings String, Dynamic Programming
- Count Sorted Vowel Strings Dynamic Programming, Math, Combinatorics
- Arithmetic Slices Array, Dynamic Programming
- Wiggle Subsequence Array, Dynamic Programming, Greedy
- Number of Longest Increasing Subsequence Array, Dynamic Programming, Binary Indexed Tree
- Longest Arithmetic Subsequence of Given Difference Array, Hash Table, Dynamic Programming
- Maximum Length of Repeated Subarray Array, Binary Search, Dynamic Programming
- Best Time to Buy and Sell Stock with Transaction Fee Array, Dynamic Programming, Greedy
- Best Time to Buy and Sell Stock with Cooldown Array, Dynamic Programming
- Delete and Earn Array, Hash Table, Dynamic Programming
- Valid Sudoku Array, Hash Table, Matrix
- Count Servers that Communicate Array, Depth-First Search, Breadth-First Search
- Number of Closed Islands Array, Depth-First Search, Breadth-First Search
- Surrounded Regions Array, Depth-First Search, Breadth-First Search
- Game of Life Array, Matrix, Simulation
- Count Square Submatrices with All Ones Array, Dynamic Programming, Matrix
- Maximal Square Array, Dynamic Programming, Matrix
- Unique Paths II Array, Dynamic Programming, Matrix
- Minimum Path Sum Array, Dynamic Programming, Matrix
- Sort the Matrix Diagonally Array, Sorting, Matrix
- Max Increase to Keep City Skyline Array, Greedy, Matrix
- Diagonal Traverse Array, Matrix, Simulation
- Spiral Matrix II Array, Matrix, Simulation
- Remove Duplicates from Sorted Array II Array, Two Pointers
- Count Number of Nice Subarrays Array, Hash Table, Math
- Binary Subarrays With Sum Array, Hash Table, Sliding Window
- Maximum Erasure Value Array, Hash Table, Sliding Window
- Minimum Operations to Reduce X to Zero Array, Hash Table, Binary Search
- Longest Subarray of 1's After Deleting One Element Array, Dynamic Programming, Sliding Window
- Continuous Subarray Sum Array, Hash Table, Math
- Contiguous Array Array, Hash Table, Prefix Sum
- Subarray Product Less Than K Array, Sliding Window, Binary Search
- Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold Array, Sliding Window
- Maximum Number of Vowels in a Substring of Given Length String, Sliding Window
- Custom Sort String Hash Table, String, Sorting
- Valid Parenthesis String String, Dynamic Programming, Stack
- String Compression Two Pointers, String
- Count and Say String, Simulation
- Reverse Words in a String Two Pointers, String
- Majority Element II Array, Hash Table, Sorting
- Increasing Triplet Subsequence Array, Greedy
- H-Index Array, Sorting, Counting Sort
- Shortest Unsorted Continuous Subarray Array, Two Pointers, Sorting
- Next Permutation Array, Two Pointers
- Find All Duplicates in an Array Array, Hash Table
- Integer to Roman Hash Table, Math, String
- Factorial Trailing Zeroes Math
- Count Primes Math, Sieve of Eratosthenes
- Reverse Integer Math
Hard (139)
- Count Ways to Make Array With Product Array, Math, Dynamic Programming
- Count the Number of Ideal Arrays Math, Dynamic Programming, Combinatorics
- Number of Ways to Rearrange Sticks With K Sticks Visible Math, Dynamic Programming, Combinatorics
- The Number of Good Subsets Array, Math, Dynamic Programming
- Number of Ways to Reorder Array to Get Same BST Array, Math, Divide and Conquer
- Make Array Strictly Increasing Array, Binary Search, Dynamic Programming
- Odd Even Jump Array, Dynamic Programming, Stack
- Maximum Number of Events That Can Be Attended II Array, Binary Search, Dynamic Programming
- Minimum Replacements to Sort the Array Array, Math, Greedy
- Create Sorted Array Through Instructions Array, Binary Search, Divide and Conquer
- Painting the Walls Array, Dynamic Programming
- Reverse Pairs Array, Binary Search, Divide and Conquer
- Number of Ways to Separate Numbers String, Dynamic Programming, Suffix Array
- Painting a Grid With Three Different Colors Dynamic Programming, Bitmask
- Minimum Incompatibility Array, Dynamic Programming, Bit Manipulation
- Number of Distinct Roll Sequences Dynamic Programming, Memoization
- Form Largest Integer With Digits That Add up to Target Array, String, Dynamic Programming
- Build Array Where You Can Find The Maximum Exactly K Comparisons Dynamic Programming, Prefix Sum
- Stone Game VIII Array, Math, Dynamic Programming
- Allocate Mailboxes Array, Math, Dynamic Programming
- Constrained Subsequence Sum Array, Dynamic Programming, Queue
- Restore the Array String, Dynamic Programming
- Count All Valid Pickup and Delivery Options Math, Dynamic Programming, Combinatorics
- Maximum Height by Stacking Cuboids Array, Dynamic Programming, Sorting
- Cherry Pickup II Array, Dynamic Programming, Matrix
- Strange Printer String, Dynamic Programming
- Number of Ways to Stay in the Same Place After Some Steps Dynamic Programming
- Maximum Value of K Coins From Piles Array, Dynamic Programming, Prefix Sum
- Count Special Integers Math, Dynamic Programming, Combinatorics
- Number of Great Partitions Array, Dynamic Programming
- Minimum Cost to Split an Array Array, Hash Table, Dynamic Programming
- Paths in Matrix Whose Sum Is Divisible by K Array, Dynamic Programming, Matrix
- Special Binary String String, Recursion, Divide and Conquer
- Count Different Palindromic Subsequences String, Dynamic Programming
- Smallest K-Length Subsequence With Occurrences of a Letter String, Stack, Greedy
- Valid Palindrome III String, Dynamic Programming
- Count Anagrams Hash Table, Math, String
- String Compression II String, Dynamic Programming
- Apply Operations to Maximize Score Array, Math, Stack
- Meeting Rooms III Array, Sorting, Simulation
- Smallest Range Covering Elements from K Lists Array, Hash Table, Greedy
- Minimize Deviation in Array Array, Greedy, Heap (Priority Queue)
- Maximum Performance of a Team Array, Greedy, Sorting
- Construct Target Array With Multiple Sums Array, Heap (Priority Queue), Math
- Minimum Number of Operations to Make Array Continuous Array, Hash Table, Binary Search
- Put Marbles in Bags Array, Greedy, Sorting
- Minimum Time to Visit a Cell In a Grid Array, Matrix, Graph
- Minimum Number of Days to Disconnect Island Array, Matrix, Depth-First Search
- Number of Increasing Paths in a Grid Array, Matrix, Dynamic Programming
- Checking Existence of Edge Length Limited Paths Array, Union Find, Graph
- Find All People With Secret Graph, Union Find, Depth-First Search
- Minimum Obstacle Removal to Reach Corner Array, Matrix, Graph
- Number of Good Paths Array, Tree, Graph
- Largest Component Size by Common Factor Array, Math, Union Find
- Critical Connections in a Network Graph, Depth-First Search, Biconnected Component
- Bus Routes Array, Hash Table, Breadth-First Search
- Number of Restricted Paths From First to Last Node Graph, Dynamic Programming, Shortest Path
- Sliding Puzzle Array, Matrix, Breadth-First Search
- Jump Game IV Array, Hash Table, Breadth-First Search
- Trapping Rain Water II Array, Matrix, Heap (Priority Queue)
- Escape the Spreading Fire Array, Matrix, Binary Search
- Grid Illumination Array, Hash Table, Matrix
- Shortest Distance from All Buildings Array, Matrix, Breadth-First Search
- Minimum Moves to Spread Stones Over Grid Array, Matrix, Dynamic Programming
- Making A Large Island Array, Matrix, Depth-First Search
- Unique Paths III Array, Matrix, Backtracking
- Number of Submatrices That Sum to Target Array, Matrix, Hash Table
- Longest Increasing Path in a Matrix Array, Matrix, Dynamic Programming
- Maximal Rectangle Array, Matrix, Stack
- Minimum Difficulty of a Job Schedule Array, Dynamic Programming
- Minimum Cost to Cut a Stick Array, Dynamic Programming, Sorting
- Minimum White Tiles After Covering With Carpets String, Dynamic Programming, Prefix Sum
- Maximum Number of Groups With Increasing Length Array, Greedy, Sorting
- Number of Ways to Earn Points Array, Dynamic Programming
- Scramble String String, Dynamic Programming
- Number of Music Playlists Math, Dynamic Programming, Combinatorics
- Profitable Schemes Array, Dynamic Programming
- Distinct Subsequences II String, Dynamic Programming
- Cherry Pickup Array, Matrix, Dynamic Programming
- Number of Ways to Paint N × 3 Grid Dynamic Programming
- Tallest Billboard Array, Dynamic Programming
- Best Time to Buy and Sell Stock IV Array, Dynamic Programming
- Burst Balloons Array, Dynamic Programming
- Frog Jump Array, Hash Table, Dynamic Programming
- Minimum Falling Path Sum II Array, Matrix, Dynamic Programming
- Dungeon Game Array, Matrix, Dynamic Programming
- Minimum Time to Complete All Tasks Array, Greedy, Sorting
- Minimum Number of Refueling Stops Array, Greedy, Dynamic Programming
- IPO Array, Greedy, Sorting
- Minimum Number of Taps to Open to Water a Garden Array, Greedy, Dynamic Programming
- Maximum Number of Tasks You Can Assign Array, Binary Search, Greedy
- Find the Kth Smallest Sum of a Matrix With Sorted Rows Array, Matrix, Binary Search
- Russian Doll Envelopes Array, Binary Search, Dynamic Programming
- Maximum Running Time of N Computers Array, Binary Search, Greedy
- Minimum Time to Complete Trips Array, Binary Search
- Kth Smallest Number in Multiplication Table Math, Binary Search
- Split Array Largest Sum Array, Binary Search, Greedy
- Minimum Number of Flips to Make the Binary String Alternating String, Sliding Window, Dynamic Programming
- Take K of Each Character From Left and Right String, Hash Table, Sliding Window
- Minimum Number of K Consecutive Bit Flips Array, Sliding Window, Prefix Sum
- Shortest Subarray with Sum at Least K Array, Prefix Sum, Sliding Window
- Count Subarrays With Fixed Bounds Array, Sliding Window, Two Pointers
- Maximum Number of Robots Within Budget Array, Sliding Window, Two Pointers
- Minimum Window Subsequence String, Two Pointers, Dynamic Programming
- Minimum Number of Moves to Make Palindrome String, Two Pointers, Greedy
- Find K-th Smallest Pair Distance Array, Two Pointers, Binary Search
- Subarrays with K Different Integers Array, Hash Table, Sliding Window
- Shortest Path Visiting All Nodes Bit Manipulation, Breadth-First Search, Graph
- Count the Number of Square-Free Subsets Bit Manipulation, Dynamic Programming, Bitmask
- Maximum AND Sum of Array Bit Manipulation, Dynamic Programming, Bitmask
- Find Subarray With Bitwise OR Closest to K Bit Manipulation, Array, Binary Search
- Minimum One Bit Operations to Make Integers Zero Bit Manipulation, Math, Dynamic Programming
- Smallest Good Base Math, Binary Search, Number Theory
- Number of Digit One Math, Digit DP, Recursion
- Preimage Size of Factorial Zeroes Function Math, Binary Search, Number Theory
- Nth Magical Number Math, Binary Search, Number Theory
- Largest Multiple of Three Array, Greedy, Dynamic Programming
- Count of Range Sum Fenwick Tree, Divide and Conquer, Prefix Sum
- Substring with Concatenation of All Words Hash Table, String, Sliding Window
- Max Points on a Line Hash Table, Math, Geometry
- Longest Happy Prefix String, KMP, Rolling Hash
- Count Unique Characters of All Substrings of a Given String String, Hash Table, Counting
- Shortest Palindrome String, KMP, Rolling Hash
- Max Value of Equation Array, Monotonic Queue, Sliding Window
- Count of Smaller Numbers After Self Array, Fenwick Tree, Divide and Conquer
- Stone Game IV Math, Dynamic Programming, Game Theory
- Stone Game III Array, Dynamic Programming, Game Theory
- Palindrome Partitioning II String, Dynamic Programming
- Wildcard Matching String, Dynamic Programming, Greedy
- Distinct Subsequences String, Dynamic Programming
- Max Dot Product Between Two Subsequences Array, Dynamic Programming
- Minimum Insertion Steps to Make a String Palindrome String, Dynamic Programming
- Swim in Rising Water Array, Binary Search, Depth-First Search
- Word Ladder Hash Table, String, Breadth-First Search
- Longest Cycle in a Graph Depth-First Search, Graph, Topological Sort
- Number of Visible People in a Queue Array, Stack, Monotonic Stack
- Longest Valid Parentheses String, Dynamic Programming, Stack
- Count Vowels Permutation Dynamic Programming
- Best Time to Buy and Sell Stock III Array, Dynamic Programming
Topics Amazon asks most
- Arrays 552 problems
- Strings 238 problems
- Math 185 problems
- Hash Table 171 problems
- Dynamic Programming 166 problems
- Greedy 144 problems
- Sorting 136 problems
- Matrix 93 problems
- Two Pointers 89 problems
- Simulation 78 problems
- Binary Search 77 problems
- Bit Manipulation 77 problems