Amazon Hard Questions

Hard

367 hard problems asked at Amazon interviews

Top Topics

Questions

TitleDifficulty
Trapping Rain WaterHard
Median of Two Sorted ArraysHard
Merge k Sorted ListsHard
Word LadderHard
Sliding Window MaximumHard
Find Median from Data StreamHard
First Missing PositiveHard
Largest Rectangle in HistogramHard
N-QueensHard
Minimum Window SubstringHard
Binary Tree Maximum Path SumHard
Serialize and Deserialize Binary TreeHard
Reverse Nodes in k-GroupHard
LFU CacheHard
Regular Expression MatchingHard
Word Search IIHard
CandyHard
Concatenated WordsHard
Basic CalculatorHard
Integer to English WordsHard
Word Break IIHard
Maximum Profit in Job SchedulingHard
Split Array Largest SumHard
Longest Valid ParenthesesHard
Sudoku SolverHard
Subarrays with K Different IntegersHard
Vertical Order Traversal of a Binary TreeHard
Word Ladder IIHard
Reverse PairsHard
Maximal RectangleHard
Critical Connections in a NetworkHard
Trapping Rain Water IIHard
Smallest Range Covering Elements from K ListsHard
Making A Large IslandHard
Sum of Total Strength of WizardsHard
Russian Doll EnvelopesHard
Minimum Difference in Sums After Removal of ElementsHard
Design In-Memory File SystemHard
Wildcard MatchingHard
Alien DictionaryHard
Bus RoutesHard
Maximum Sum BST in Binary TreeHard
Text JustificationHard
Distinct SubsequencesHard
Find Longest Self-Contained SubstringHard
Find the Number of Possible Ways for an EventHard
Binary Tree CamerasHard
Substring with Concatenation of All WordsHard
Permutation SequenceHard
Burst BalloonsHard
Department Top Three SalariesHard
Reconstruct ItineraryHard
Put Marbles in BagsHard
Dungeon GameHard
Substring With Largest VarianceHard
Frog JumpHard
Maximum Number of Groups With Increasing LengthHard
Minimum Number of Refueling StopsHard
Maximum Number of Books You Can TakeHard
Palindrome Partitioning IIHard
Shortest Path in a Grid with Obstacles EliminationHard
Recover a Tree From Preorder TraversalHard
Minimum Cost to Cut a StickHard
Best Time to Buy and Sell Stock IIIHard
Length of Longest V-Shaped Diagonal SegmentHard
Longest Duplicate SubstringHard
Find Minimum Time to Finish All JobsHard
Total Appeal of A StringHard
Count Subarrays With Median KHard
Meeting Rooms IIIHard
Shortest PalindromeHard
Minimum Swaps to Avoid Forbidden ValuesHard
All O`one Data StructureHard
Partition Array Into Two Arrays to Minimize Sum DifferenceHard
Shortest Common SupersequenceHard
Maximum Number of Robots Within BudgetHard
Find the K-Sum of an ArrayHard
GCD Sort of an ArrayHard
Allocate MailboxesHard
Longest Increasing Path in a MatrixHard
Super Washing MachinesHard
Number of Distinct Islands IIHard
Orderly QueueHard
Maximum Score Words Formed by LettersHard
Count Stepping Numbers in RangeHard
Maximize Fixed Points After DeletionsHard
Max Points on a LineHard
Find K-th Smallest Pair DistanceHard
Valid NumberHard
Number of Digit OneHard
N-Queens IIHard
Shortest Subarray with Sum at Least KHard
Find Maximum Non-decreasing Array LengthHard
Check for Contradictions in EquationsHard
Cut Off Trees for Golf EventHard
Design a Text EditorHard
Next Palindrome Using Same DigitsHard
Maximum Bitwise AND After Increment OperationsHard
Maximum Frequency StackHard
Unique Paths IIIHard
Serialize and Deserialize N-ary TreeHard
Design an Array Statistics TrackerHard
Minimum Number of Moves to Make PalindromeHard
Insert Delete GetRandom O(1) - Duplicates allowedHard
Design Search Autocomplete SystemHard
Swim in Rising WaterHard
Maximum Number of Non-Overlapping SubstringsHard
Maximum Number of Achievable Transfer RequestsHard
Length of the Longest Valid SubstringHard
Longest Common SubpathHard
Customers With Strictly Increasing PurchasesHard
Time Taken to Cross the DoorHard
Find Number of Coins to Place in Tree NodesHard
Replace Non-Coprime Numbers in ArrayHard
Minimum Swaps To Make Sequences IncreasingHard
Find Number of Ways to Reach the K-th StairHard
Minimum Degree of a Connected Trio in a GraphHard
Minimum Score After Removals on a TreeHard
Closest RoomHard
Sales by Day of the WeekHard
Handshakes That Don't CrossHard
IPOHard
Lexicographically Maximum MEX ArrayHard
Parsing A Boolean ExpressionHard
The Skyline ProblemHard
Max StackHard
Shortest Matching SubstringHard
Find in Mountain ArrayHard
Number of Submatrices That Sum to TargetHard
Find Critical and Pseudo-Critical Edges in Minimum Spanning TreeHard
Sum of Scores of Built StringsHard
Count the Number of K-Big IndicesHard
Count Number of Special SubsequencesHard
Digit Count in RangeHard
Find Cumulative Salary of an EmployeeHard
Subarrays Distinct Element Sum of Squares IIHard
Maximum Balanced Subsequence SumHard
Count Beautiful Substrings IIHard
Distribute Candies Among Children IIIHard
Sequentially Ordinal Rank TrackerHard
Minimum Operations to Make the Array K-IncreasingHard
Build Binary Expression Tree From Infix ExpressionHard
Minimum Operations to Remove Adjacent Ones in MatrixHard
Largest Multiple of ThreeHard
Longest Winning StreakHard
Count Ways to Make Array With ProductHard
Find the Number of Subarrays Where Boundary Elements Are MaximumHard
Count Pairs Of NodesHard
Maximize the Beauty of the GardenHard
Numbers At Most N Given Digit SetHard
Minimum Money Required Before TransactionsHard
Minimum Space Wasted From PackagingHard
Trionic Array IIHard
Minimum Stability Factor of ArrayHard
Max Dot Product of Two SubsequencesHard
Minimum Cost to Merge StonesHard
Best Time to Buy and Sell Stock IVHard
Find the Median of the Uniqueness ArrayHard
Course Schedule IIIHard
Guess the WordHard
Minimum Difficulty of a Job ScheduleHard
Parallel Courses IIIHard
Nth Magical NumberHard
Longest Happy PrefixHard
Count of Smaller Numbers After SelfHard
Number of Visible People in a QueueHard
Trips and UsersHard
Find the Minimum Area to Cover All Ones IIHard
Scramble StringHard
Basic Calculator IIIHard
Threshold Majority QueriesHard
Total Sum of Interaction Cost in Tree GroupsHard
Minimum Cost to Partition a Binary StringHard
Number of AtomsHard
Find the Closest PalindromeHard
Maximum Number of Events That Can Be Attended IIHard
K-th Smallest in Lexicographical OrderHard
Maximum Performance of a TeamHard
Kth Smallest Product of Two Sorted ArraysHard
Maximize Subarrays After Removing One Conflicting PairHard
Minimum Cost to Reach Destination in TimeHard
Sliding Window MedianHard
Human Traffic of StadiumHard
Maximum Sum of 3 Non-Overlapping SubarraysHard
Minimum Cost to Convert String IIHard
Special Binary StringHard
Maximum Number of Tasks You Can AssignHard
Number of ZigZag Arrays IHard
Process String with Special Operations IIHard
Cherry Pickup IIHard
Minimum Initial Energy to Finish TasksHard
Jump Game IVHard
Separate Squares IIHard
Minimum Pair Removal to Sort Array IIHard
Count of Range SumHard
Remove Invalid ParenthesesHard
Optimal Account BalancingHard
Minimum Insertion Steps to Make a String PalindromeHard
Shortest Distance from All BuildingsHard
Sum of Prefix Scores of StringsHard
Set Intersection Size At Least TwoHard
Minimum Number of Increments on Subarrays to Form a Target ArrayHard
Minimum Cost to Hire K WorkersHard
Contains Duplicate IIIHard
Number of Pairs Satisfying InequalityHard
Rearrange String k Distance ApartHard
Find the Original Typed String IIHard
Last Day Where You Can Still CrossHard
Create Maximum NumberHard
Profitable SchemesHard
Employee Free TimeHard
Strong Password CheckerHard
Maximum Score From Grid OperationsHard
Robot CollisionsHard
Maximum Height by Stacking CuboidsHard
Total Waviness of Numbers in Range IIHard
Number of Islands IIHard
Minimum Cost Path with TeleportationsHard
Rearranging FruitsHard
Find Minimum in Rotated Sorted Array IIHard
Count Subarrays With Fixed BoundsHard
Palindrome PairsHard
Arithmetic Slices II - SubsequenceHard
Strange PrinterHard
Robot Room CleanerHard
Minimum Number of Removals to Make Mountain ArrayHard
Maximum Employees to Be Invited to a MeetingHard
Escape the Spreading FireHard
Check if the Rectangle Corner Is ReachableHard
Find Servers That Handled Most Number of RequestsHard
Minimum Obstacle Removal to Reach CornerHard
Lexicographically Smallest Beautiful StringHard
Count Palindromic SubsequencesHard
Minimum Cost to Make at Least One Valid Path in a GridHard
Max Chunks To Make Sorted IIHard
Design Excel Sum FormulaHard
Cherry PickupHard
Maximum Running Time of N ComputersHard
Number of Ways to Paint N × 3 GridHard
Shortest Path Visiting All NodesHard
Last Substring in Lexicographical OrderHard
Minimum Number of Taps to Open to Water a GardenHard
Reaching PointsHard
Best Meeting PointHard
Count Subarrays With Score Less Than KHard
Expression Add OperatorsHard
Paths in Matrix Whose Sum Is Divisible by KHard
Minimum Operations to Equalize Binary StringHard
Maximize the Minimum Powered CityHard
Parallel Courses IIHard
Jump Game VHard
Longest Common Suffix QueriesHard
Divide an Array Into Subarrays With Minimum Cost IIHard
Longest Balanced Subarray IIHard
Fancy SequenceHard
Maximum Walls Destroyed by RobotsHard
XOR After Range Multiplication Queries IIHard
Perfect RectangleHard
Minimum Edge Reversals So Every Node Is ReachableHard
Find All Possible Stable Binary Arrays IIHard
Merge BSTs to Create Single BSTHard
Range ModuleHard
Super Egg DropHard
Kth Ancestor of a Tree NodeHard
Minimum Number of Days to Disconnect IslandHard
Minimum Time to Visit a Cell In a GridHard
Dinner Plate StacksHard
Minimize Max Distance to Gas StationHard
Minimum Operations to Make a SubsequenceHard
Find Building Where Alice and Bob Can MeetHard
Data Stream as Disjoint IntervalsHard
Maximum Difference Between Even and Odd Frequency IIHard
Longest Cycle in a GraphHard
Analyze Organization HierarchyHard
Divide Nodes Into the Maximum Number of GroupsHard
Sliding PuzzleHard
Count Unique Characters of All Substrings of a Given StringHard
The Earliest and Latest Rounds Where Players CompeteHard
Remove BoxesHard
Count the Number of Ideal ArraysHard
Maximum Frequency of an Element After Performing Operations IIHard
Stream of CharactersHard
Find the K-th Character in String Game IIHard
Maximum Fruits Harvested After at Most K StepsHard
Patching ArrayHard
Longest Path With Different Adjacent CharactersHard
Closest Binary Search Tree Value IIHard
Report Contiguous DatesHard
Count the Number of InversionsHard
Escape a Large MazeHard
Find the Kth Smallest Sum of a Matrix With Sorted RowsHard
Minimize Malware SpreadHard
Split Array With Same AverageHard
Distinct Subsequences IIHard
Number of Good PathsHard
Car Fleet IIHard
Maximize Spanning Tree Stability with UpgradesHard
Minimum Cost to Buy Apples IIHard
Max Sum of Rectangle No Larger Than KHard
Median Employee SalaryHard
Minimum Deletions to Make Array DivisibleHard
Minimum Cost to Make Array EqualHard
K-Similar StringsHard
Sum of Distances in TreeHard
Minimum Cost Walk in Weighted GraphHard
Split Message Based on LimitHard
Minimum Cost to Equalize ArrayHard
Valid Arrangement of PairsHard
Count Different Palindromic SubsequencesHard
Minimum Interval to Include Each QueryHard
Subarray With Elements Greater Than Varying ThresholdHard
Random Pick with BlacklistHard
Manhattan Distances of All Arrangements of PiecesHard
Maximum Number of K-Divisible ComponentsHard
Minimum Operations to Make Array Equal to TargetHard
Maximum Strength of K Disjoint SubarraysHard
Minimum Number of Operations to Make Arrays SimilarHard
Maximize the Minimum Game ScoreHard
Year on Year Growth RateHard
Maximum Score of Non-overlapping IntervalsHard
Zuma GameHard
Tiling a Rectangle with the Fewest SquaresHard
Minimum Amount of Damage Dealt to BobHard
Count the Number of Arrays with K Matching Adjacent ElementsHard
Painting a Grid With Three Different ColorsHard
Minimum Unique Word AbbreviationHard
Pizza With 3n SlicesHard
Longest Subsequence Repeated k TimesHard
Kth Smallest InstructionsHard
Delete Duplicate Folders in SystemHard
Minimize the Maximum Adjacent Element DifferenceHard
Maximum Number of Visible PointsHard
Find the Largest Palindrome Divisible by KHard
Number of Ways to Form a Target String Given a DictionaryHard
Falling SquaresHard
Tallest BillboardHard
String Compression IIHard
Smallest Good BaseHard
Sort Items by Groups Respecting DependenciesHard
Erect the FenceHard
Sum of Perfect Square AncestorsHard
Encrypt and Decrypt StringsHard
Maximize Cyclic Partition ScoreHard
Find All People With SecretHard
Maximum Building HeightHard
Design Movie Rental SystemHard
Number of ZigZag Arrays IIHard
Similar String GroupsHard
Minimum Number of K Consecutive Bit FlipsHard
Painting the WallsHard
Valid Palindrome IIIHard
Delete Columns to Make Sorted IIIHard
Non-negative Integers without Consecutive OnesHard
Reachable Nodes In Subdivided GraphHard
Maximum Number of Points From Grid QueriesHard
Word AbbreviationHard
Lexicographically Smallest Generated StringHard
Final Array State After K Multiplication Operations IIHard
Minimum Total Distance TraveledHard
Largest Color Value in a Directed GraphHard
Design SkiplistHard
Odd Even JumpHard
Maximum Total Subarray Value IIHard
Kth Smallest Number in Multiplication TableHard
Number of Ways to Assign Edge Weights IIHard
Number of Unique Good SubsequencesHard
Collect Coins in a TreeHard

Showing 367 questions