Skip to content

Hash Table problems,
and the tell.

The question asks whether something has been seen, or how many times, and the order does not matter. 387 problems in the catalogue carry this tag, from first-week easy to interview hard.

Free to start. Running and submitting a solution never costs credits.

How the pattern actually works.

One mechanism, and the mistake that costs people the problem.

The tell. The question asks whether something has been seen, or how many times, and the order does not matter.

The mechanism. Trade memory for time: write what you have seen into a map as you walk, then every later question about the past is one lookup instead of another loop.

What goes wrong. Storing before you look. For pair problems, ask the map first and write afterwards, or a number pairs with itself.

The ones asked most often.

By how often the catalogue records them being set, not by our opinion.

  1. Two SumEasyasked at 114 companies
  2. LRU CacheMediumasked at 101 companies
  3. Insert Delete GetRandom O(1)Mediumasked at 40 companies
  4. Intersection of Two ArraysEasyasked at 12 companies
  5. Logger Rate LimiterEasyasked at 7 companies
  6. Longest Substring with At Most K Distinct CharactersMediumasked at 5 companies
  7. Count Zero Request ServersMediumasked at 5 companies
  8. Number of Divisible SubstringsMediumasked at 4 companies
  9. Rank Teams by VotesMediumasked at 4 companies
  10. Minimum Deletions to Make Character Frequencies UniqueMediumasked at 3 companies

Read it, watch it, then solve it.

The order that makes a pattern stick.

Everything in the app, in one place.

Practice, interviews and the tools, all free to start. Swipe to see the rest.

Free to start: 100 AI credits when you sign up and 100 every month. Start free in the app

About hash table problems.

Free to start, no card.

Start practising
How do I know a problem is a hash table problem?

The question asks whether something has been seen, or how many times, and the order does not matter.

How many hash table problems should I solve?

Enough to stop needing the hint, which is usually ten to fifteen across the levels, not the whole list. The catalogue tags 387, split roughly 47 easy, 122 medium and 31 hard in the sample we show, so work up rather than across.

What goes wrong most often in hash table problems?

Storing before you look. For pair problems, ask the map first and write afterwards, or a number pairs with itself.

Is practising by pattern better than a problem sheet?

A sheet tells you what to solve. A pattern tells you why those problems sit together, which is the part that carries over to the problem you have not seen. That is why the app files every problem under its pattern.