Amazon Medium Questions

Medium

1074 medium problems asked at Amazon interviews

Top Topics

Questions

TitleDifficulty
LRU CacheMedium
Number of IslandsMedium
Longest Substring Without Repeating CharactersMedium
Group AnagramsMedium
Add Two NumbersMedium
Reorganize StringMedium
3SumMedium
Longest Palindromic SubstringMedium
Merge IntervalsMedium
Container With Most WaterMedium
Koko Eating BananasMedium
Course ScheduleMedium
Rotting OrangesMedium
Subarray Sum Equals KMedium
Search in Rotated Sorted ArrayMedium
Top K Frequent ElementsMedium
Maximum SubarrayMedium
Longest Consecutive SequenceMedium
Copy List with Random PointerMedium
Lowest Common Ancestor of a Binary TreeMedium
Generate ParenthesesMedium
Product of Array Except SelfMedium
Jump GameMedium
House RobberMedium
Letter Combinations of a Phone NumberMedium
Course Schedule IIMedium
Word SearchMedium
Spiral MatrixMedium
Rotate ImageMedium
Next PermutationMedium
Analyze User Website Visit PatternMedium
Coin ChangeMedium
Task SchedulerMedium
Kth Largest Element in an ArrayMedium
Meeting Rooms IIMedium
SubsetsMedium
Unique PathsMedium
Insert Delete GetRandom O(1)Medium
Find Peak ElementMedium
Word BreakMedium
Asteroid CollisionMedium
Jump Game IIMedium
Reverse IntegerMedium
Sort ColorsMedium
Rotate ArrayMedium
Find First and Last Position of Element in Sorted ArrayMedium
Longest Repeating Character ReplacementMedium
Fruit Into BasketsMedium
Min StackMedium
Best Time to Buy and Sell Stock IIMedium
Valid SudokuMedium
4SumMedium
Identify the Largest Outlier in an ArrayMedium
Max Consecutive Ones IIIMedium
Capacity To Ship Packages Within D DaysMedium
Daily TemperaturesMedium
Search a 2D MatrixMedium
Single Element in a Sorted ArrayMedium
Binary Tree Right Side ViewMedium
Binary Tree Zigzag Level Order TraversalMedium
Zigzag ConversionMedium
All Nodes Distance K in Binary TreeMedium
Set Matrix ZeroesMedium
Find the Duplicate NumberMedium
Binary Tree Level Order TraversalMedium
Next Greater Element IIMedium
Pow(x, n)Medium
PermutationsMedium
String CompressionMedium
Gas StationMedium
Combination SumMedium
Two Sum II - Input Array Is SortedMedium
Maximum Product SubarrayMedium
String to Integer (atoi)Medium
Integer to RomanMedium
Reorder ListMedium
Longest Increasing SubsequenceMedium
Validate Binary Search TreeMedium
Remove Nth Node From End of ListMedium
Odd Even Linked ListMedium
Reverse Words in a StringMedium
Edit DistanceMedium
Partition Equal Subset SumMedium
3Sum ClosestMedium
Search a 2D Matrix IIMedium
Sum of Subarray MinimumsMedium
Number of ProvincesMedium
Basic Calculator IIMedium
Evaluate DivisionMedium
Palindrome PartitioningMedium
Largest NumberMedium
Plates Between CandlesMedium
K Closest Points to OriginMedium
Rotate ListMedium
Maximum Frequency After Subarray OperationMedium
Decode StringMedium
Minimum Size Subarray SumMedium
Time Based Key-Value StoreMedium
Evaluate Reverse Polish NotationMedium
Search Suggestions SystemMedium
Peak Index in a Mountain ArrayMedium
Remove Duplicates from Sorted Array IIMedium
Count PrimesMedium
Second Highest SalaryMedium
Find Minimum in Rotated Sorted ArrayMedium
Construct Binary Tree from Preorder and Inorder TraversalMedium
Find All Anagrams in a StringMedium
Maximum Width of Binary TreeMedium
Lowest Common Ancestor of a Binary Search TreeMedium
Random Pick with WeightMedium
Permutation in StringMedium
The kth Factor of nMedium
Reverse Linked List IIMedium
Surrounded RegionsMedium
Find K Closest ElementsMedium
Lowest Common Ancestor of a Binary Tree IIIMedium
Minimum Health to Beat GameMedium
Pacific Atlantic Water FlowMedium
Minimum Path SumMedium
Rearrange Array Elements by SignMedium
Simplify PathMedium
Populating Next Right Pointers in Each NodeMedium
Minimum Time to Complete All DeliveriesMedium
Linked List Cycle IIMedium
Top K Frequent WordsMedium
Sort ListMedium
Subsets IIMedium
Kth Smallest Element in a BSTMedium
Target SumMedium
Partition LabelsMedium
Online Stock SpanMedium
Cheapest Flights Within K StopsMedium
Managers with at Least 5 Direct ReportsMedium
Sort Characters By FrequencyMedium
Divide Two IntegersMedium
House Robber IIIMedium
Boats to Save PeopleMedium
Majority Element IIMedium
Minimum Number of Days to Make m BouquetsMedium
Find Triangular Sum of an ArrayMedium
Non-overlapping IntervalsMedium
Remove K DigitsMedium
Frequency of the Most Frequent ElementMedium
Contiguous ArrayMedium
Snakes and LaddersMedium
Swap Nodes in PairsMedium
Open the LockMedium
Count and SayMedium
Maximum Width RampMedium
Maximum Number of Vowels in a Substring of Given LengthMedium
Furthest Building You Can ReachMedium
Sort an ArrayMedium
Longest Palindromic SubsequenceMedium
Accounts MergeMedium
House Robber IIMedium
Product Sales Analysis IIIMedium
Exclusive Time of FunctionsMedium
Palindromic SubstringsMedium
Design TwitterMedium
Decode WaysMedium
Unique Paths IIMedium
Combination Sum IIMedium
TriangleMedium
01 MatrixMedium
Count Good NumbersMedium
Monthly Transactions IMedium
Implement Trie (Prefix Tree)Medium
Maximum Sum of Distinct Subarrays With Length KMedium
Search in Rotated Sorted Array IIMedium
Maximum Points You Can Obtain from CardsMedium
Design Tic-Tac-ToeMedium
Delete Node in a Linked ListMedium
Max Area of IslandMedium
Delete Node in a BSTMedium
Sum of Subarray RangesMedium
Longest Continuous Subarray With Absolute Diff Less Than or Equal to LimitMedium
Clone GraphMedium
Recover Binary Search TreeMedium
Longest Common SubsequenceMedium
Shortest Path in Binary MatrixMedium
Find K Pairs with Smallest SumsMedium
Number of Distinct IslandsMedium
Maximum K to Sort a PermutationMedium
Amount of Time for Binary Tree to Be InfectedMedium
Valid Parenthesis StringMedium
Lexicographically Smallest Negated Permutation that Sums to TargetMedium
Partition ListMedium
Sum of Two IntegersMedium
First Unique NumberMedium
Coin Change IIMedium
Design Add and Search Words Data StructureMedium
Flatten Binary Tree to Linked ListMedium
Maximal SquareMedium
Subarray Product Less Than KMedium
Increasing Triplet SubsequenceMedium
Diagonal TraverseMedium
Interleaving StringMedium
Insert IntervalMedium
Process String with Special Operations IMedium
Single Number IIMedium
Design Circular QueueMedium
Is Graph Bipartite?Medium
Minimum Add to Make Parentheses ValidMedium
Swapping Nodes in a Linked ListMedium
Find the Smallest Divisor Given a ThresholdMedium
Apply Discount to PricesMedium
Minimum Number of Primes to Sum to TargetMedium
Number of Connected Components in an Undirected GraphMedium
Boundary of Binary TreeMedium
Most Expensive Item That Can Not Be BoughtMedium
Partition Array According to Given PivotMedium
Permutations IIMedium
Confirmation RateMedium
Compare Version NumbersMedium
Find Eventual Safe StatesMedium
Maximum Number of Events That Can Be AttendedMedium
Remove Duplicate LettersMedium
Reorder Data in Log FilesMedium
Consecutive NumbersMedium
Rotate FunctionMedium
Rank ScoresMedium
Minimum Falling Path SumMedium
Domino and Tromino TilingMedium
Path Sum IIIMedium
Balance a Binary Search TreeMedium
Remove All Adjacent Duplicates in String IIMedium
Binary Subarrays With SumMedium
Count Square Submatrices with All OnesMedium
Gray CodeMedium
Next Greater Element IIIMedium
Make Sum Divisible by PMedium
Removing Stars From a StringMedium
Make String a Subsequence Using Cyclic IncrementsMedium
Minimum Number of Pushes to Type Word IIMedium
Customers Who Bought All ProductsMedium
Smallest Subsequence of Distinct CharactersMedium
Minimum Operations to Make Array Non DecreasingMedium
Construct Binary Search Tree from Preorder TraversalMedium
Kth Largest Sum in a Binary TreeMedium
H-IndexMedium
Longest Substring with At Least K Repeating CharactersMedium
Nth Highest SalaryMedium
Immediate Food Delivery IIMedium
Binary Search Tree IteratorMedium
Predict the WinnerMedium
Maximum Average Pass RatioMedium
Distribute Candies Among Children IIMedium
Split Linked List in PartsMedium
Using a Robot to Print the Lexicographically Smallest StringMedium
Maximum Coins From K Consecutive BagsMedium
Angle Between Hands of a ClockMedium
Longest Arithmetic Sequence After Changing At Most One ElementMedium
Multiply StringsMedium
Magnetic Force Between Two BallsMedium
Sell Diminishing-Valued Colored BallsMedium
Flatten a Multilevel Doubly Linked ListMedium
Unique Binary Search TreesMedium
Different Ways to Add ParenthesesMedium
Kth Smallest Element in a Sorted MatrixMedium
Sum of Beauty of All SubstringsMedium
Custom Sort StringMedium
Count Number of Rectangles Containing Each PointMedium
Max Sum of a Pair With Equal Sum of DigitsMedium
Binary Search Tree to Greater Sum TreeMedium
Count Bowl SubarraysMedium
Spiral Matrix IIMedium
Flip String to Monotone IncreasingMedium
CombinationsMedium
Find All Duplicates in an ArrayMedium
Minimum Swaps to Group All 1's Together IIMedium
Maximum Length of Pair ChainMedium
Shortest Path with Alternating ColorsMedium
The Number of the Smallest Unoccupied ChairMedium
Cousins in Binary Tree IIMedium
Number of Ways to Split ArrayMedium
Loud and RichMedium
Design an Expression Tree With Evaluate FunctionMedium
Move Pieces to Obtain a StringMedium
Interval List IntersectionsMedium
Minimum Cost For TicketsMedium
Maximum Sum With at Most K ElementsMedium
Perfect SquaresMedium
132 PatternMedium
Shortest Subarray to be Removed to Make Array SortedMedium
Design Memory AllocatorMedium
Path Sum IIMedium
Partition Array Such That Maximum Difference Is KMedium
Minimum Operations to Make the Array AlternatingMedium
Convert BST to Greater TreeMedium
Maximum Difference Between Node and AncestorMedium
Number of Dice Rolls With Target SumMedium
Lowest Common Ancestor of a Binary Tree IVMedium
Number of Ways to Select BuildingsMedium
Minimum Adjacent Swaps to Make a Valid ArrayMedium
Minimum Number of Operations to Sort a Binary Tree by LevelMedium
Smallest Number in Infinite SetMedium
Construct Smallest Number From DI StringMedium
Minimum Rounds to Complete All TasksMedium
Clone Binary Tree With Random PointerMedium
Most Frequent Subtree SumMedium
Count Unreachable Pairs of Nodes in an Undirected GraphMedium
Strictly Palindromic NumberMedium
Optimal Partition of StringMedium
Car FleetMedium
Min Cost to Connect All PointsMedium
Most Stones Removed with Same Row or ColumnMedium
Concatenation of Consecutive Binary NumbersMedium
Repeated DNA SequencesMedium
Exchange SeatsMedium
Maximize Happiness of Selected ChildrenMedium
Serialize and Deserialize BSTMedium
Continuous Subarray SumMedium
Find All Possible Recipes from Given SuppliesMedium
Product Price at a Given DateMedium
Find the CelebrityMedium
Remove Nodes From Linked ListMedium
HeatersMedium
Keys and RoomsMedium
Maximum Erasure ValueMedium
Unique Length-3 Palindromic SubsequencesMedium
Combination Sum IIIMedium
K-diff Pairs in an ArrayMedium
Uncrossed LinesMedium
Fair Distribution of CookiesMedium
Reverse Words in a String IIMedium
MinesweeperMedium
Count Beautiful Substrings IMedium
Count the Hidden SequencesMedium
Minimum Sum of Squared DifferenceMedium
Count Number of TeamsMedium
Encode and Decode TinyURLMedium
Number of Smooth Descent Periods of a StockMedium
Generate Binary Strings Without Adjacent ZerosMedium
Number of Operations to Make Network ConnectedMedium
Minimum Genetic MutationMedium
Max Number of K-Sum PairsMedium
Bulb SwitcherMedium
Partition to K Equal Sum SubsetsMedium
Network Delay TimeMedium
All Paths From Source to TargetMedium
Redundant ConnectionMedium
Design File SystemMedium
Minimum Removals to Balance ArrayMedium
Flatten Nested List IteratorMedium
Maximum Sum Circular SubarrayMedium
Binary Tree Vertical Order TraversalMedium
Check If Array Pairs Are Divisible by kMedium
Count Zero Request ServersMedium
Minimum Array SumMedium
Count Covered BuildingsMedium
Sum Root to Leaf NumbersMedium
Design Hit CounterMedium
Subarray Sums Divisible by KMedium
Longest Repeating SubstringMedium
Minimum Average DifferenceMedium
Design a Food Rating SystemMedium
Minimum Number of Operations to Make Array EmptyMedium
Minimum Length of String After Deleting Similar EndsMedium
K Divisible Elements SubarraysMedium
Maximum Alternating Subarray SumMedium
Path With Maximum Minimum ValueMedium
Find Missing ObservationsMedium
Distant BarcodesMedium
Find the Divisibility Array of a StringMedium
Maximum Bags With Full Capacity of RocksMedium
Product Sales Analysis IVMedium
Find and Replace PatternMedium
Maximum Matching of Players With TrainersMedium
Smallest Subarrays With Maximum Bitwise ORMedium
Maximum Total from Optimal Activation OrderMedium
Maximum Element After Decreasing and RearrangingMedium
Number of Laser Beams in a BankMedium
Maximize the Profit as the SalesmanMedium
Most Frequent IDsMedium
Two Sum BSTsMedium
Solve the EquationMedium
Sum of Nodes with Even-Valued GrandparentMedium
Maximize Number of Subsequences in a StringMedium
Count Number of TextsMedium
Maximum Consecutive Floors Without Special FloorsMedium
Get Watched Videos by Your FriendsMedium
Insert into a Binary Search TreeMedium
Minimum Operations to Reduce X to ZeroMedium
Design Browser HistoryMedium
Restore IP AddressesMedium
Battleships in a BoardMedium
Minimum Operations to Sort a StringMedium
Department Highest SalaryMedium
Walls and GatesMedium
Lexicographical NumbersMedium
My Calendar IMedium
Delete and EarnMedium
Minimum Number of Coins to be AddedMedium
Unique Binary Search Trees IIMedium
Nested List Weight SumMedium
Count the Number of Fair PairsMedium
Maximize Y‑Sum by Picking a Triplet of Distinct X‑ValuesMedium
Construct String from Binary TreeMedium
Prison Cells After N DaysMedium
Missing Element in Sorted ArrayMedium
All Elements in Two Binary Search TreesMedium
Minimum Number of KeypressesMedium
Find Minimum Time to Finish All Jobs IIMedium
Difference Between Ones and Zeros in Row and ColumnMedium
Find Distance in a Binary TreeMedium
Maximum Star Sum of a GraphMedium
Check if Move is LegalMedium
Optimal DivisionMedium
Connecting Cities With Minimum CostMedium
Sum of Beauty in the ArrayMedium
Find the Index of the Large IntegerMedium
Adding Spaces to a StringMedium
Minimum Garden Perimeter to Collect Enough ApplesMedium
Replace Question Marks in String to Minimize Its ValueMedium
Decode XORed PermutationMedium
Double a Number Represented as a Linked ListMedium
Form Array by Concatenating Subarrays of Another ArrayMedium
Split Array into Fibonacci SequenceMedium
Valid Palindrome IVMedium
Sum of Number and Its ReverseMedium
Design SQLMedium
Monotone Increasing DigitsMedium
Append Characters to String to Make SubsequenceMedium
Delete Leaves With a Given ValueMedium
Insufficient Nodes in Root to Leaf PathsMedium
Decode the Slanted CiphertextMedium
Find Good Days to Rob the BankMedium
Closest DivisorsMedium
Replace Elements in an ArrayMedium
Number of Steps to Reduce a Number in Binary Representation to OneMedium
Minimum Operations to Sort a PermutationMedium
Find the Length of the Longest Common PrefixMedium
Bulls and CowsMedium
Minimized Maximum of Products Distributed to Any StoreMedium
Distribute Coins in Binary TreeMedium
Magic Squares In GridMedium
Maximum Matrix SumMedium
Design Linked ListMedium
Construct Binary Tree from Inorder and Postorder TraversalMedium
Find a Peak Element IIMedium
Snapshot ArrayMedium
Maximum Candies Allocated to K ChildrenMedium
Restaurant GrowthMedium
Remove All Occurrences of a SubstringMedium
Maximum Twin Sum of a Linked ListMedium
Largest Divisible SubsetMedium
Number of Substrings Containing All Three CharactersMedium
Reorder Routes to Make All Paths Lead to the City ZeroMedium
Longest Subarray of 1's After Deleting One ElementMedium
Number of Subsequences That Satisfy the Given Sum ConditionMedium
Max Chunks To Make SortedMedium
Two Best Non-Overlapping EventsMedium
Game of LifeMedium
2 Keys KeyboardMedium
Shortest BridgeMedium
Maximum Subarray Sum with One DeletionMedium
Maximum SwapMedium
Count Servers that CommunicateMedium
Valid Triangle NumberMedium
Pseudo-Palindromic Paths in a Binary TreeMedium
Minimize the Difference Between Target and Chosen ElementsMedium
Longest Square Streak in an ArrayMedium
Find the Substring With Maximum CostMedium
Relocate MarblesMedium
Merge Operations to Turn Array Into a PalindromeMedium
Jump Game VIIIMedium
Maximal Range That Each Element Is Maximum in ItMedium
Construct Binary Tree from StringMedium
Complex Number MultiplicationMedium
Maximum of Minimum Values in All SubarraysMedium
Find K-Length Substrings With No Repeated CharactersMedium
Find Xor-Beauty of ArrayMedium
Maximum Average SubtreeMedium
Clone N-ary TreeMedium
Maximum Linear Stock ScoreMedium
Minimum Numbers of Function Calls to Make Target ArrayMedium
Equal Tree PartitionMedium
Count the Number of K-Free SubsetsMedium
Number of Sets of K Non-Overlapping Line SegmentsMedium
Remove Covered IntervalsMedium
Find the Missing IDsMedium
Find the Maximum Number of Elements in SubsetMedium
Closest Leaf in a Binary TreeMedium
Design Front Middle Back QueueMedium
Add Two Polynomials Represented as Linked ListsMedium
Append K Integers With Minimal SumMedium
Global and Local InversionsMedium
Split BSTMedium
Number of Calls Between Two PersonsMedium
Maximum Sum Score of ArrayMedium
Users With Two Purchases Within Seven DaysMedium
Number of Times a Driver Was a PassengerMedium
Count the Number of Special Characters IIMedium
Sort Features by PopularityMedium
Products With Three or More Orders in Two Consecutive YearsMedium
Maximum Sum of Almost Unique SubarrayMedium
Grand Slam TitlesMedium
Time Needed to Rearrange a Binary StringMedium
Find Interview CandidatesMedium
Number of Unique CategoriesMedium
Count Triplets with Even XOR Set Bits IIMedium
Distinct Numbers in Each SubarrayMedium
Employees With DeductionsMedium
Queries on a Permutation With KeyMedium
Maximum Capacity Within BudgetMedium
Maximum Ice Cream BarsMedium
Convert Sorted List to Binary Search TreeMedium
Find the Prefix Common Array of Two ArraysMedium
Range Sum Query 2D - ImmutableMedium
Single Number IIIMedium
Minimum Number of Groups to Create a Valid AssignmentMedium
Minimum Fuel Cost to Report to the CapitalMedium
Pairs of Songs With Total Durations Divisible by 60Medium
Minimum Number of Arrows to Burst BalloonsMedium
Path With Minimum EffortMedium
Delete Nodes From Linked List Present in ArrayMedium
House Robber IVMedium
Course Schedule IVMedium
Number of Zero-Filled SubarraysMedium
Avoid Flood in The CityMedium
Game Play Analysis IVMedium
Car PoolingMedium
Count Vowel Strings in RangesMedium
Encode and Decode StringsMedium
Remove Sub-Folders from the FilesystemMedium
Minimum Time to Activate StringMedium
Maximum Median Sum of Subsequences of Size 3Medium
Minimize Array Sum Using Divisible ReplacementsMedium
Minimum Flips to Make Binary String CoherentMedium
Create Binary Tree From DescriptionsMedium
Minimum Height TreesMedium
Sum of Square NumbersMedium
Separate Squares IMedium
Elimination GameMedium
Find the Maximum Length of Valid Subsequence IMedium
Ugly Number IIMedium
Longest Happy StringMedium
Minimum Remove to Make Valid ParenthesesMedium
Nearest Exit from Entrance in MazeMedium
Minimum Number of Swaps to Make the String BalancedMedium
Successful Pairs of Spells and PotionsMedium
Count Number of Bad PairsMedium
Number of Ways to Arrive at DestinationMedium
Lexicographically Minimum String After Removing StarsMedium
New 21 GameMedium
Soup ServingsMedium
Greatest Sum Divisible by ThreeMedium
Count the Number of Substrings With Dominant OnesMedium
Populating Next Right Pointers in Each Node IIMedium
Add Two Numbers IIMedium
Find Duplicate SubtreesMedium
Factorial Trailing ZeroesMedium
Minimum Cost to Connect SticksMedium
Minimum Sensors to Cover GridMedium
Maximum Calories Burnt from JumpsMedium
Maximize Points After Choosing K TasksMedium
Maximum Score After Binary SwapsMedium
Sum of GCD of Formed PairsMedium
Maximum Total Value of Covered IndicesMedium
Total Waviness of Numbers in Range IMedium
Jump Game VIIMedium
Detect Cycles in 2D GridMedium
Walking Robot SimulationMedium
Rotating the BoxMedium
Find the Winner of the Circular GameMedium
Champagne TowerMedium
Longest Balanced Substring IMedium
Sum of Absolute Differences in a Sorted ArrayMedium
Possible BipartitionMedium
Count Good Nodes in Binary TreeMedium
Detonate the Maximum BombsMedium
Count Number of Nice SubarraysMedium
Delete the Middle Node of a Linked ListMedium
Nth DigitMedium
Most Beautiful Item for Each QueryMedium
Longest Substring with At Most K Distinct CharactersMedium
Maximize Distance to Closest PersonMedium
Reordered Power of 2Medium
Minimum Knight MovesMedium
Movie RatingMedium
Buildings With an Ocean ViewMedium
Check if a Parentheses String Can Be ValidMedium
Grumpy Bookstore OwnerMedium
Minimum Difference Between Largest and Smallest Value in Three MovesMedium
Word SubsetsMedium
Longest Subarray With Maximum Bitwise ANDMedium
String Compression IIIMedium
Total Characters in String After Transformations IMedium
Maximum Absolute Sum of Any SubarrayMedium
Lexicographically Smallest Equivalent StringMedium
Vowel SpellcheckerMedium
Reschedule Meetings for Maximum Free Time IMedium
Minimum Equal Sum of Two Arrays After Replacing ZerosMedium
Largest 1-Bordered SquareMedium
Find Largest Value in Each Tree RowMedium
Minimum Time DifferenceMedium
Trim a Binary Search TreeMedium
Next Greater Node In Linked ListMedium
Robot Bounded In CircleMedium
Longest Nice SubarrayMedium
Continuous SubarraysMedium
Separate Black and White BallsMedium
Lexicographically Smallest String After Applying OperationsMedium
Last Stone Weight IIMedium
Minimum Limit of Balls in a BagMedium
Even Odd TreeMedium
Insertion Sort ListMedium
Lexicographically Smallest Permutation Greater Than TargetMedium
Earliest Finish Time for Land and Water Rides IIMedium
Minimum Moves to Make Array ComplementaryMedium
Maximum Level Sum of a Binary TreeMedium
Minimum Cost Path with Edge ReversalsMedium
Partition Array for Maximum SumMedium
Maximum Subarray Min-ProductMedium
Maximum Product of Splitted Binary TreeMedium
Arithmetic SlicesMedium
Minimum Cost to Convert String IMedium
As Far from Land as PossibleMedium
Find Kth Bit in Nth Binary StringMedium
Binary Tree Level Order Traversal IIMedium
Design Task ManagerMedium
The k-th Lexicographical String of All Happy Strings of Length nMedium
Best Time to Buy and Sell Stock with CooldownMedium
Remove Duplicates from Sorted List IIMedium
Can I WinMedium
K-th Symbol in GrammarMedium
Rabbits in ForestMedium
Reveal Cards In Increasing OrderMedium
Regions Cut By SlashesMedium
Invalid TransactionsMedium
Minimum Number of Operations to Move All Balls to Each BoxMedium
Step-By-Step Directions From a Binary Tree Node to AnotherMedium
Water and Jug ProblemMedium
Count the Number of Complete ComponentsMedium
Number of Sub-arrays With Odd SumMedium
Count Number of Maximum Bitwise-OR SubsetsMedium
Minimum Domino Rotations For Equal RowMedium
Number of Sub-arrays of Size K and Average Greater than or Equal to ThresholdMedium
Make Lexicographically Smallest Array by Swapping ElementsMedium
Length of Longest Fibonacci SubsequenceMedium
Maximum Tastiness of Candy BasketMedium
Minimize the Maximum Difference of PairsMedium
Find the Minimum Area to Cover All Ones IMedium
Maximum Subarray Sum With Length Divisible by KMedium
Range Product Queries of PowersMedium
Ways to Express an Integer as Sum of PowersMedium
Minimum Penalty for a ShopMedium
Bitwise AND of Numbers RangeMedium
Combination Sum IVMedium
Shortest Unsorted Continuous SubarrayMedium
Best Time to Buy and Sell Stock with Transaction FeeMedium
Maximum Length of Repeated SubarrayMedium
Hand of StraightsMedium
Filling Bookcase ShelvesMedium
Stone Game IIMedium
Find the City With the Smallest Number of Neighbors at a Threshold DistanceMedium
Design a Stack With Increment OperationMedium
Minimum Operations to Make Binary Array Elements Equal to One IMedium
Investments in 2016Medium
Sort the Jumbled NumbersMedium
Valid Tic-Tac-Toe StateMedium
Design Snake GameMedium
Maximum Total Damage With Spell CastingMedium
Zero Array Transformation IMedium
Maximum Balanced ShipmentsMedium
Maximum Good Subarray SumMedium
Maximum GapMedium
Maximize Area of Square Hole in GridMedium
Maximum Side Length of a Square with Sum Less than or Equal to ThresholdMedium
Construct the Minimum Bitwise Array IIMedium
Check If a String Contains All Binary Codes of Size KMedium
Longest Balanced Subarray IMedium
Longest Balanced Substring IIMedium
Find Score of an Array After Marking All ElementsMedium
Partitioning Into Minimum Number Of Deci-Binary NumbersMedium
Minimum Increment to Make Array UniqueMedium
Find Closest Node to Given Two NodesMedium
Minimum Deletions to Make String BalancedMedium
Fraction to Recurring DecimalMedium
Wiggle Sort IIMedium
Friend Requests II: Who Has the Most FriendsMedium
Dota2 SenateMedium
Construct Quad TreeMedium
Number of Matching SubsequencesMedium
All Possible Full Binary TreesMedium
Last Person to Fit in the BusMedium
Maximum Length of Subarray With Positive ProductMedium
Extra Characters in a StringMedium
Divide Array Into Arrays With Max DifferenceMedium
Count Complete Subarrays in an ArrayMedium
Divide Players Into Teams of Equal SkillMedium
Find the Longest Substring Containing Vowels in Even CountsMedium
Find the Maximum Length of Valid Subsequence IIMedium
Task Scheduler IIMedium
Solving Questions With BrainpowerMedium
Map of Highest PeakMedium
Find the Punishment Number of an IntegerMedium
The Most Frequently Ordered Products for Each CustomerMedium
Zero Array Transformation IIMedium
Max Difference You Can Get From Changing an IntegerMedium
Shifting Letters IIMedium
Minimize XORMedium
Out of Boundary PathsMedium
Neighboring Bitwise XORMedium
Tree DiameterMedium
Find Duplicate File in SystemMedium
Minimum Time to Complete TripsMedium
Find the Number of Ways to Place People IMedium
Minimum Operations to Make the Integer ZeroMedium
Number of People Aware of a SecretMedium
Taking Maximum Energy From the Mystic DungeonMedium
Best Time to Buy and Sell Stock VMedium
Minimum Moves to Equal Array ElementsMedium
Kill ProcessMedium
Reach a NumberMedium
Validate Stack SequencesMedium
Find the Minimum and Maximum Number of Nodes Between Critical PointsMedium
Length of the Longest Subsequence That Sums to TargetMedium
Best Sightseeing PairMedium
Check if Number is a Sum of Powers of ThreeMedium
Take K of Each Character From Left and RightMedium
Number of Subarrays with Bounded MaximumMedium
Count Total Number of Colored CellsMedium
Maximum Sum of Two Non-Overlapping SubarraysMedium
Minimum Time to Repair CarsMedium
Count Submatrices With All OnesMedium
Fruits Into Baskets IIIMedium
Smallest Missing Non-negative Integer After OperationsMedium
Pyramid Transition MatrixMedium
Largest Palindromic NumberMedium
Web CrawlerMedium
First Completely Painted Row or ColumnMedium
Maximum Number of Jumps to Reach the Last IndexMedium
Minimum Absolute Distance Between Mirror PairsMedium
Brick WallMedium
Rotated DigitsMedium
Jump Game IIIMedium
Find Unique Binary StringMedium
Sum of DistancesMedium
Longest Arithmetic SubsequenceMedium
Paint HouseMedium
Largest Magic SquareMedium
Maximum Non Negative Product in a MatrixMedium
Linked List ComponentsMedium
Rectangle AreaMedium
Smallest String Starting From LeafMedium
Sliding Subarray BeautyMedium
Super Ugly NumberMedium
Delete Nodes And Return ForestMedium
Maximum Total Subarray Value IMedium
Queue Reconstruction by HeightMedium
Integer BreakMedium
Find Leaves of Binary TreeMedium
Delete Operation for Two StringsMedium
Smallest Range IIMedium
Design A LeaderboardMedium
Group the People Given the Group Size They Belong ToMedium
Product of the Last K NumbersMedium
Design Underground SystemMedium
Least Number of Unique Integers after K RemovalsMedium
Dot Product of Two Sparse VectorsMedium
Process Tasks Using ServersMedium
Merge Nodes in Between ZerosMedium
Cache With Time LimitMedium
4Sum IIMedium
Largest Combination With Bitwise AND Greater Than ZeroMedium
Minimum Operations to Make All Array Elements EqualMedium
All Ancestors of a Node in a Directed Acyclic GraphMedium
Prime PalindromeMedium
Numbers With Same Consecutive DifferencesMedium
Design Log Storage SystemMedium
Maximum Number of Removable CharactersMedium
Zigzag IteratorMedium
Find the Lexicographically Largest String From the Box IMedium
Rearrange Array to Maximize Prefix ScoreMedium
Minimum Score Triangulation of PolygonMedium
Most Profitable Path in a TreeMedium
Apply Operations to Make All Array Elements Equal to ZeroMedium
Construct the Lexicographically Largest Valid SequenceMedium
Closest Prime Numbers in RangeMedium
Count Univalue SubtreesMedium
Minimum Deletions to Make Character Frequencies UniqueMedium
Range Sum Query 2D - MutableMedium
Count Partitions With Max-Min Difference at Most KMedium
Mirror ReflectionMedium
Minimum Operations to Convert All Elements to ZeroMedium
Maximum Frequency of an Element After Performing Operations IMedium
Sort Matrix by DiagonalsMedium
Get Biggest Three Rhombus Sums in a GridMedium
Find the Minimum Amount of Time to Brew PotionsMedium
Maximum Number of Distinct Elements After OperationsMedium
Best Time to Buy and Sell Stock using StrategyMedium
Super PowMedium
Find Right IntervalMedium
Find Bottom Left Tree ValueMedium
Most Profit Assigning WorkMedium
Knight DialerMedium
Count Subarrays Where Max Element Appears at Least K TimesMedium
Stock Price FluctuationMedium
Number of Good Ways to Split a StringMedium
Bitwise ORs of SubarraysMedium
Paint House IVMedium
Market Analysis IMedium
Finding the Users Active MinutesMedium
N-ary Tree Level Order TraversalMedium
Minimum Operations to Reduce an Integer to 0Medium
Minimum Number of People to TeachMedium
Construct Product MatrixMedium
Detect SquaresMedium
Ones and ZeroesMedium
Delete Columns to Make Sorted IIMedium
Number of Ways to Assign Edge Weights IMedium
Closest Equal Element QueriesMedium
Minimum Jumps to Reach End via Prime TeleportationMedium
Minimum Operations to Make a Uni-Value GridMedium
Jump Game IXMedium
Score After Flipping MatrixMedium
Satisfiability of Equality EquationsMedium
Largest Submatrix With RearrangementsMedium
Maximum Amount of Money Robot Can EarnMedium
Happy StudentsMedium
Mini ParserMedium
Minimum Number of Seconds to Make Mountain Height ZeroMedium
Two City SchedulingMedium
Time Needed to Inform All EmployeesMedium
Maximum Product of Word LengthsMedium
Maximum Size Subarray Sum Equals kMedium
Random Pick IndexMedium
Validate IP AddressMedium
Shopping OffersMedium
Meeting SchedulerMedium
Remove Zero Sum Consecutive Nodes from Linked ListMedium
Reverse Substrings Between Each Pair of ParenthesesMedium
XOR Queries of a SubarrayMedium
Minimum Number of Steps to Make Two Strings AnagramMedium
Determine if Two Strings Are CloseMedium
Minimize Maximum of ArrayMedium
Count the Number of Good SubarraysMedium
Longest Turbulent SubarrayMedium
Minimum Number of Operations to Make Array XOR Equal to KMedium
Minimum Array EndMedium
Find Occurrences of an Element in an ArrayMedium
HTML Entity ParserMedium
Maximize Score of Numbers in RangesMedium
Split a String Into the Max Number of Unique SubstringsMedium
Graph Valid TreeMedium
Grid GameMedium
Construct K Palindrome StringsMedium
Maximal Score After Applying K OperationsMedium
The MazeMedium
Flip Columns For Maximum Number of Equal RowsMedium
Binary Tree PruningMedium
Circular Array LoopMedium
Maximum Number of Fish in a GridMedium
Tuple with Same ProductMedium
Employee ImportanceMedium
Number of Pairs of Interchangeable RectanglesMedium
Count of Substrings Containing Every Vowel and K Consonants IIMedium
Find the Number of Distinct Colors Among the BallsMedium
Minimum Operations to Exceed Threshold Value IIMedium
Parallel CoursesMedium
Sentence Similarity IIMedium
Check if Grid can be Cut into SectionsMedium
Finding Pairs With a Certain SumMedium
Longest Binary Subsequence Less Than or Equal to KMedium
Push DominoesMedium
Number of Adjacent Elements With the Same ColorMedium
Minimum Time to Make Rope ColorfulMedium
Count Collisions of Monkeys on a PolygonMedium
Reschedule Meetings for Maximum Free Time IIMedium
Maximum Score From Removing SubstringsMedium
Maximum XOR of Two Numbers in an ArrayMedium
Longest Non-decreasing Subarray From Two ArraysMedium
Longest String ChainMedium
Power Grid MaintenanceMedium
Minimum Number of Operations to Make All Array Elements Equal to 1Medium
Maximum Number of Operations to Move Ones to the EndMedium
Bag of TokensMedium
Plus One Linked ListMedium
Shuffle an ArrayMedium
Beautiful ArrayMedium
Path with Maximum ProbabilityMedium
Merge In Between Linked ListsMedium
Sort the Matrix DiagonallyMedium
Longest Absolute File PathMedium
My Calendar IIMedium
Count Ways To Build Good StringsMedium
Minimum Time to Collect All Apples in a TreeMedium
Minimum Moves to Equal Array Elements IIMedium
Find Minimum Time to Reach Last Room IIMedium
Smallest Integer Divisible by KMedium
Matchsticks to SquareMedium
Largest Sum of AveragesMedium
Repeated String MatchMedium
Minimize Maximum Pair Sum in ArrayMedium
Rank Teams by VotesMedium
Maximum Number of Occurrences of a SubstringMedium
Number of Longest Increasing SubsequenceMedium
Ugly Number IIIMedium
Friends Of Appropriate AgesMedium
XOR After Range Multiplication Queries IMedium
Count Nodes Equal to Average of SubtreeMedium
Maximum and Minimum Sums of at Most Size K SubsequencesMedium
Minimum Swaps to Arrange a Binary GridMedium
Minimum Number of Flips to Make the Binary String AlternatingMedium
Path with Maximum GoldMedium
Count Salary CategoriesMedium
Find Maximum Value in a Constrained SequenceMedium
Find All Possible Stable Binary Arrays IMedium
Minimum Subarray Length With Distinct Sum At Least KMedium
Exam RoomMedium
Count Submatrices With Equal Frequency of X and YMedium
Check if Strings Can be Made Equal With Operations IIMedium
Final Element After Subarray DeletionsMedium
Minimum Cost to Split into OnesMedium
Cyclically Rotating a GridMedium
Beautiful ArrangementMedium
Minimum ASCII Delete Sum for Two StringsMedium
Letter Case PermutationMedium
Advantage ShuffleMedium
Spiral Matrix IIIMedium
Construct Binary Tree from Preorder and Postorder TraversalMedium
Flip Equivalent Binary TreesMedium
Check Completeness of a Binary TreeMedium
Number of EnclavesMedium
Number of Closed IslandsMedium
Longest ZigZag Path in a Binary TreeMedium
Maximum Number of Coins You Can GetMedium
Single-Threaded CPUMedium
Equal Row and Column PairsMedium
Maximum Subsequence ScoreMedium
Length of Longest Subarray With at Most K FrequencyMedium
The Number of Beautiful SubsetsMedium
Find Elements in a Contaminated Binary TreeMedium
Sentence Similarity IIIMedium
Average Waiting TimeMedium
Divide Intervals Into Minimum Number of GroupsMedium
Linked List in Binary TreeMedium
Find the Number of Good Pairs IIMedium
Event EmitterMedium
Find Longest Special Substring That Occurs Thrice IMedium
Range Sum of Sorted Subarray SumsMedium
Maximum Number of Points with CostMedium
Reverse Nodes in Even Length GroupsMedium
Maximum Distance in ArraysMedium
Range AdditionMedium
Minimum Insertions to Balance a Parentheses StringMedium
Lexicographically Smallest String After Substring OperationMedium
Count Nodes With the Highest ScoreMedium
Design Circular DequeMedium
Word Pattern IIMedium
The Most Recent Orders for Each ProductMedium
Complete Binary Tree InserterMedium
Minimum Division Operations to Make Array Non DecreasingMedium
Find if Array Can Be SortedMedium
Length of the Longest Alphabetical Continuous SubstringMedium
Simple Bank SystemMedium
Prime Subtraction OperationMedium
All People Report to the Given ManagerMedium
Largest Element in an Array after Merge OperationsMedium
Minimum Length of String After OperationsMedium
Count Days Without MeetingsMedium
Describe the PaintingMedium
Maximum Possible Number by Binary ConcatenationMedium
Maximum XOR After OperationsMedium
Minimum Score of a Path Between Two CitiesMedium
Select K Disjoint Special SubstringsMedium
Collecting ChocolatesMedium
Alice and Bob Playing Flower GameMedium
Maximum Value of an Ordered Triplet IIMedium
Minimum Index of a Valid SplitMedium
Maximize Greatness of an ArrayMedium
Customer Purchasing Behavior AnalysisMedium
Number of Subarrays That Match a Pattern IMedium
String Without AAA or BBBMedium
Two-Letter Card GameMedium
Pizza Toppings Cost AnalysisMedium
Minimum Cost to Make Arrays IdenticalMedium
Binary Tree Longest Consecutive SequenceMedium
Maximum Profit From Trading StocksMedium
Count Unguarded Cells in the GridMedium
Smallest Palindromic Rearrangement IMedium
Minimum Number of Swaps to Make the Binary String AlternatingMedium
Magical StringMedium
Integer ReplacementMedium
Count Beautiful Splits in an ArrayMedium
Longest Substring with At Most Two Distinct CharactersMedium
Zero Array Transformation IIIMedium
Clumsy FactorialMedium
Count the Number of Computer Unlocking PermutationsMedium
Find Smallest Common Element in All RowsMedium
Convert Binary Search Tree to Sorted Doubly Linked ListMedium
Longest Common Prefix Between Adjacent Strings After RemovalsMedium
Maximum Beauty of an Array After Applying OperationMedium
Minimum Moves to Reach Target ScoreMedium
Diagonal Traverse IIMedium
Stable Subarrays With Equal Boundary and Interior SumMedium
Lowest Common Ancestor of Deepest LeavesMedium
Inorder Successor in BSTMedium
Sort the Students by Their Kth ScoreMedium
Remove Stones to Minimize the TotalMedium
Remove Duplicates From an Unsorted Linked ListMedium
Balanced K-Factor DecompositionMedium
Minimum Number of Work Sessions to Finish the TasksMedium
Maximum Value after InsertionMedium
Count Substrings That Can Be Rearranged to Contain a String IMedium
The Maze IIMedium
Maximum Size of a Set After RemovalsMedium
Minimum Operations to Write the Letter Y on a GridMedium
Water Bottles IIMedium
Decoded String at IndexMedium
Binary Tree Coloring GameMedium
Sequence ReconstructionMedium
Minimum Suffix FlipsMedium
Longest Mountain in ArrayMedium
Non-decreasing SubsequencesMedium
Minimum Operations to Make Array EqualMedium
Count Collisions on a RoadMedium
Longest Word in DictionaryMedium
Wiggle SortMedium
Minimum Seconds to Equalize a Circular ArrayMedium
Minimum Time for K Connected ComponentsMedium
Print Binary TreeMedium
Smallest Subtree with all the Deepest NodesMedium
Shortest Distance After Road Addition Queries IMedium
Operations on TreeMedium
Implement RouterMedium
Count Good MealsMedium
Non-decreasing ArrayMedium
Special Array IIMedium
Minimum Non-Zero Product of the Array ElementsMedium
Check Knight Tour ConfigurationMedium
Count Number of Ways to Place HousesMedium
Four DivisorsMedium
Sparse Matrix MultiplicationMedium
Restore the Array From Adjacent PairsMedium
Find Original Array From Doubled ArrayMedium
Number of Substrings With Only 1sMedium
Promise Time LimitMedium
Maximum Sum of Three Numbers Divisible by ThreeMedium
Implement Trie II (Prefix Tree)Medium
Minimize the Maximum of Two ArraysMedium
Frog Jump IIMedium
Design SpreadsheetMedium
Array NestingMedium
3Sum With MultiplicityMedium
Vowels Game in a StringMedium
Minimum Addition to Make Integer BeautifulMedium
Longest Univalue PathMedium
Longest Palindrome by Concatenating Two Letter WordsMedium
Sort Vowels in a StringMedium
Find Product Recommendation PairsMedium
Maximum Number of Weeks for Which You Can WorkMedium
Minimum Impossible ORMedium
Minimum Absolute Difference in Sliding SubmatrixMedium
Grid Teleportation TraversalMedium
Equal Sum Grid Partition IMedium
Stone GameMedium
The Time When the Network Becomes IdleMedium
Minimum Distance Between Three Equal Elements IIMedium
Properties GraphMedium
Maximize the Confusion of an ExamMedium
Words Within Two Edits of DictionaryMedium
Put Boxes Into the Warehouse IMedium
Number of Subarrays With LCM Equal to KMedium
Jump Game VIMedium
Minimum Swaps to Group All 1's TogetherMedium
Pancake SortingMedium
Binary Trees With FactorsMedium
Score of ParenthesesMedium
Build an Array With Stack OperationsMedium
Find Mirror Score of a StringMedium
Maximize Sum of Device RatingsMedium
Find Minimum Cost to Remove Array ElementsMedium

Showing 1074 questions