Skip to content

Interview Solver

FeaturesPricingHelp
Sign In
FeaturesPricingHelpSign In
  1. Interview Questions
  2. /
  3. Problems

Most-asked coding interview problems

The 100 problems tagged by the most companies in our interview dataset. Each page lets you write and test a solution in Python or JavaScript in your browser, then walks through the approach from brute force to optimal.

ProblemPatternDifficultyCompanies
Two SumHash map of complementsEasy196
LRU CacheHash map + doubly linked listMedium196
Number of IslandsFlood fill (DFS/BFS on a grid)Medium189
Merge IntervalsSort, then sweepMedium183
Valid ParenthesesStack of open bracketsEasy180
Longest Palindromic SubstringExpand around centerMedium166
Longest Substring Without Repeating CharactersSliding window with last-seen indexMedium165
Best Time to Buy and Sell StockRunning minimumEasy163
Trapping Rain WaterTwo pointers with running maximumsHard161
Group AnagramsHash map keyed by a canonical formMedium156
Container With Most WaterTwo pointers from both endsMedium153
Maximum SubarrayKadane's algorithmMedium149
Search in Rotated Sorted ArrayBinary search on the sorted halfMedium149
Spiral MatrixShrinking boundariesMedium143
Rotting OrangesMulti-source BFSMedium142
String CompressionRead and write pointersMedium140
Valid PalindromeTwo pointers from both endsEasy137
Merge k Sorted ListsMin-heap of list headsHard135
Top K Frequent ElementsCount, then bucket by frequencyMedium135
Product of Array Except SelfPrefix and suffix productsMedium133
Rotate ImageTranspose, then reverse each rowMedium133
Roman to IntegerCompare each symbol with the nextEasy133
Course ScheduleTopological sort (Kahn’s algorithm)Medium132
Decode StringStack for nested structureMedium132
Sliding Window MaximumMonotonic dequeHard131
Climbing Stairs1D dynamic programmingEasy130
Merge Sorted ArrayTwo pointers from the backEasy129
3SumSort + two pointersMedium128
Median of Two Sorted ArraysBinary search on a partitionHard127
Basic Calculator IIRunning term with deferred additionMedium127
Longest Consecutive SequenceHash set, count from run startsMedium126
Word LadderBreadth-first search on an implicit graphHard126
Next PermutationRightmost ascent, swap, reverseMedium126
Add Two NumbersDigit-by-digit addition with a carryMedium125
Longest Common PrefixVertical scanEasy124
Letter Combinations of a Phone NumberBacktracking over choicesMedium124
Subarray Sum Equals KPrefix sums + hash map of countsMedium123
Generate ParenthesesBacktracking with constraintsMedium123
Coin ChangeBottom-up DP over amountsMedium123
Gas StationGreedy restart on deficitMedium123
Kth Largest Element in an ArrayQuickselectMedium122
Minimum Window SubstringVariable-size sliding window with countsHard120
Min StackStack with running minimumMedium120
Palindrome NumberReverse half the digitsEasy118
House Robber1D dynamic programmingMedium118
Basic CalculatorRunning sum with a stack of saved contextsHard118
Word SearchGrid backtracking (DFS)Medium117
Subsets IIBacktracking with duplicate skippingMedium117
Move ZeroesRead/write two pointersEasy116
All Nodes Distance K in Binary TreeTree to graph + BFSMedium116
Add StringsDigit-by-digit addition with a carryEasy87
Sqrt(x)Binary search on the answerEasy103
Minimum Array Sum0/1 knapsack DP with two budgetsMedium87
Meeting Rooms IISweep line over start and end eventsMedium117
Daily TemperaturesMonotonic decreasing stackMedium106
Minimum Path Sum2D grid dynamic programmingMedium104
Ransom NoteCharacter frequency countingEasy99
Valid AnagramCharacter frequency countingEasy110
Missing RangesLinear scan with sentinelsEasy116
Isomorphic StringsBijection check with two hash mapsEasy82
Logger Rate LimiterHash map of next allowed timeEasy101
Pascal's TriangleBuild each row from the previous rowEasy96
Merge Strings AlternatelyTwo pointers over two sequencesEasy102
Reverse Words in a StringTokenize, then reverseMedium102
Length of Last WordScan from the endEasy75
Find the Index of the First Occurrence in a StringString matching with a prefix function (KMP)Easy111
Fraction to Recurring DecimalLong division with a remainder mapMedium90
Remove Duplicates from Sorted ArraySlow/fast two pointersEasy109
Analyze User Website Visit PatternGroup, enumerate triples, count with a set per userMedium95
Maximum Number of Occurrences of a SubstringFixed-size sliding window with a frequency mapMedium90
Invalid TransactionsParse, group by key, compare within groupsMedium75
Custom Sort StringCounting sort by a custom keyMedium74
Accounts MergeUnion-find over shared keysMedium108
Expression Add OperatorsBacktracking with a running valueHard99
Combination SumBacktracking with a start indexMedium111
Maximum Profit in Job SchedulingSort by end + DP + binary searchHard99
Sum Root to Leaf NumbersDFS with a running prefix valueMedium89
Closest Binary Search Tree ValueWalk one BST search pathEasy89
Minimum Limit of Balls in a BagBinary search on the answerMedium95
Subarrays with K Different IntegersSliding window: exactly k = at most k - at most (k - 1)Hard116
Squares of a Sorted ArrayTwo pointers from both endsEasy107
Missing NumberSum or XOR identityEasy85
Maximize Amount After Two Days of ConversionsGraph traversal with multiplied edge weightsMedium92
Binary Tree Right Side ViewLevel-order traversal (BFS by level)Medium93
Word Break IIBacktracking with memoizationHard98
Valid Palindrome IITwo pointers with one branchEasy94
Flood FillGrid DFS/BFS over a connected componentEasy106
Maximum Matrix SumParity invariant (greedy)Medium92
Word Ladder IIBFS layers + backtracking over a parent DAGHard97
Counting BitsDP over bitsEasy93
Search Suggestions SystemSort, then binary search each prefixMedium110
Remove All Adjacent Duplicates in String IIStack of (character, run length)Medium89
Ways to Make a Fair ArrayPrefix sums split by parityMedium84
Can Place FlowersGreedy left-to-right placementEasy86
Longest Arithmetic Subsequence of Given DifferenceDP in a hash map keyed by valueMedium89
Longest Repeating Character ReplacementSliding window with a max-frequency countMedium102
Remove All Adjacent Duplicates in StringStack as the surviving prefixEasy93
Palindrome Linked ListFast/slow pointers plus in-place reversalEasy95
Find Peak ElementBinary search on the slopeMedium102
Check If a Word Occurs As a Prefix of Any Word in a SentenceSplit and check prefixesEasy98

Get live help in the real interview

Working solutions in real time during your actual interview. Invisible to screensharing.

Start Free Trial

No credit card required

Interview Solver
  • Home
  • About
  • Pricing
  • Sign in
  • Contact
  • Blog
  • Companion
  • Mobile
  • Help Center
  • Developers
  • Use Cases
  • AI Interview Copilot
  • Coding Interview Copilot
  • AI Interview Assistant
  • Software Engineer
  • Product Manager
  • Misc
  • Privacy Policy
  • Terms and Conditions
  • Refund & Cancellation
  • Discord Community
  • Affiliate Program
  • Compare
  • All Comparisons
  • vs Final Round AI
  • vs UltraCode
  • vs Interview Coder
  • vs LockedIn AI
  • vs AI Apply
  • vs Cluely
  • vs LeetCode Wizard
  • Free Tools
  • ATS Resume Checker
  • STAR Method Builder
  • Salary Lookup
  • Big O Cheat Sheet
  • Total Comp Calculator
  • View All →
  • Interview Questions
  • Google Questions
  • Amazon Questions
  • Microsoft Questions
  • Meta Questions
  • Apple Questions
  • TikTok Questions
  • View All →
© 2026 Interview Solver, Inc. All rights reserved.