devlk
c/interviews u/devlk Team

How many LeetCode problems should I solve before interviewing?

Team FAQ: this question comes up often, so we've answered it below. Add your own experience, or a different view, in the comments.

There's a lot of advice about grinding hundreds of problems. How much is actually needed?

1
1 comment
Sort by: Best Top New Old
devlk Team·

There's no magic number. Recognising patterns matters far more than how many problems you've done.

Solving 300 problems by memorising answers helps less than understanding about 15 common patterns well:

  • Two pointers, sliding window
  • Hash maps for counting and lookup
  • Stacks and queues
  • Binary search (including on answers)
  • Trees: traversals, BFS and DFS
  • Graphs: BFS, DFS, topological sort
  • Heaps and top-K problems
  • Intervals
  • Basic dynamic programming
  • Backtracking

A practical approach:

  1. Study one pattern at a time and solve a handful of problems for each, mostly easy and medium.
  2. For each problem, explain your approach out loud before coding, and analyse time and space complexity.
  3. If you're stuck after 20–30 minutes, read the solution, understand it, then solve it again a few days later without help.
  4. Do some timed practice to simulate tests.

Also check what the company actually asks. Many companies, especially smaller ones and remote-first teams, use take-home tasks or practical coding instead of puzzle-style questions. See what to expect at each interview stage.

1