skip to content
technical interview prep · no account to start

interview questions, answered at three depths,
scheduled for review.

Pick a roadmap for a role, a skill or a tool; three sliders decide which of its questions are in your plan. A question is a card with a short answer, the one you would say aloud, and a self-contained deep dive; in review you grade your own recall, and a scheduler on our server books the next look for when it estimates you are about to forget.
100 roadmaps56,281 interview questions

How does a Java HashMap store key-value pairs internally, and how does it find a value by key?

level: juniorimportance: must knowfreq 90%
answer
recall hints5 hints
  1. Array of buckets, each bucket = chain of Node<K,V>
  2. put = hash to index, store; get = same index, equals to match
  3. Collision = two keys, same bucket -> chained
  4. Amortized O(1); needs correct hashCode + equals
  5. Keys should be immutable
basics~20 s

A HashMap keeps an array of buckets. It turns each key into a number (a hash), uses that number to pick a bucket, and stores the key and value there. To get a value it hashes the key again, jumps to the same bucket, and compares keys with equals to find the match.

solid answer ~40 slevel notes 4 levelsdeep dive ~3 mincommon follow-ups 2 questionsred flags 4 flagsrelated questions 9 questionsrelated topics 3 topicsreferences 3 links

how it works

roadmap → plan → learn → review

The first look puts a question on the schedule; every review after that goes one step deeper.

01

pick a roadmap

An ordered path of topics for a role (java-developer, qa-engineer), a skill (kotlin, sql) or a tool (kafka, postgresql). Type a role into the catalog search and the matching roadmaps rank first.

02

set the plan

On the roadmap page three sliders, frequency, level and importance, decide which questions are in; the counts recompute as you move them, and you can tick topics out. ▸ start learning saves the plan.

03

learn in sittings

A sitting is a short fixed run of cards with the recall hints and the whole § answer zone open. Read basics, press got it, and the card is on the schedule. That is all a first look is for.

04

review when it is due

A due card shows the question only; one key shows the hints, the next shows the answer. didn't recall brings the card back tomorrow, got it books it further out. FSRS-6, on our server, with or without an account.

one question

the same leaf, pitched at seniors

The card at the top of the page is the junior question on Java's HashMap. This is its senior sibling from the same topic leaf: a knowledge question carries a note per seniority band, follow-ups written in an interviewer's voice and, on most, the red flags that lose the question.

What is bucket treeification in HashMap (Java 8+), and under what exact conditions does it happen?

level: seniorimportance: should knowfreq 55%
answer
recall hints5 hints
  1. TREEIFY_THRESHOLD = 8, MIN_TREEIFY_CAPACITY = 64
  2. Both needed: 8 already there AND capacity>=64, else resize
  3. Tree: O(log n) if hashes differ or keys orderable
  4. UNTREEIFY_THRESHOLD = 6 at resize; remove tests tree shape
  5. Defense vs hash-flooding; rare under random hash codes
basics~20 s

Since Java 8, HashMap can turn a crowded bucket's list into a red-black tree, to limit worst-case lookups. A put converts it when adding to a bucket already holding 8 entries, if the table has at least 64 buckets; otherwise it resizes.

solid answer ~50 slevel notes 4 levelsdeep dive ~4 mincommon follow-ups 2 questionsred flags 6 flagsrelated questions 5 questionsrelated topics 2 topicsreferences 3 linksversions since Java 1.8

level notes4 levels
for a junior
Aware that overcrowded buckets can become trees for performance, without the exact constants.
for a middle
States the 8 / 64 / 6 constants and that treeification gives O(log n) per bucket when keys have distinct hashes or are orderable.
for a senior
Explains the dual condition (8 already in the bin AND capacity>=64), the resize-instead path, why removal ignores the 6, and the hash-flooding motivation.
for a principal
Frames treeification as a worst-case/DoS safety net within hashing design trade-offs and stresses that good hashCode design makes it irrelevant in practice.
red flags6 flags

saying these in an interview costs you the question

  • Saying a bucket treeifies at 8 regardless of capacity (the 64 guard is required)
  • Claiming the whole map becomes a tree (only the crowded bucket does)
  • Thinking treeification replaces the need for a good hashCode
  • Saying removal untreeifies a bin at exactly 6 nodes (that count applies to a resize split)
  • Believing it exists in Java 7 (it is a Java 8 feature)
  • Claiming tree bins give O(log n) for any keys, even equal hashes with no Comparable ordering

If you are experienced, set the level slider on a roadmap page to senior → principal: a question's level is the lowest seniority expected to know it, so the plan keeps only questions pitched there.

roadmaps

start from a roadmap

Role roadmaps with their module groups and live question counts. The catalog holds 100 roadmaps; a topic with nothing written yet is marked soon on its roadmap page.

java-developer

16896 questions
  • Language & Platform2439
  • CS Foundations1643
  • Software Design555
  • Coding Interview: Data Structures & Algorithms833
  • Spring Framework1041
  • Networking & HTTP356
  • + 21 more modules
open roadmap

kotlin-developer

16551 questions
  • Language & Platform2103
  • CS Foundations1643
  • Software Design555
  • Coding Interview: Data Structures & Algorithms833
  • JVM Web Frameworks912
  • Networking & HTTP356
  • + 22 more modules
open roadmap
two ways to use it

an interview on the calendar, or the long run

Same roadmap, same scheduler. The difference is where you set the controls.

an interview on the calendar

frequency
Raise the low thumb so only the highest-frequency questions stay in. Frequency is our estimate of how often a question is asked at that level, a ranking, not a measurement.
importance
must know.
study order
by frequency, the default: most-asked first.
target date
The interview day, at least a week out, on review settings. Intervals never reach past the date, the retention target ramps up over the last month, and no new cards start in the final week.

Afterwards, clear the date and widen the plan with ▸ update plan; every card you graded keeps its schedule.

the long run

frequency
all.
importance
nice to know, the floor at its lowest, everything in.
level
senior → principal if you are experienced (see one question, above).
target date
None. Intervals stretch while you keep recalling; a card is marked known once the scheduler's stability estimate for it passes 90 days.

Open review when its badge shows a number; learn new cards when it does not.

content

written by ai, checked by scripts

All of the content is written and verified by AI and scripts. That is what lets us produce the materials at low cost. Every question card you study from has a bug icon in its corner, so anyone who finds a problem can report it.

faq

common questions

Yes. All of the content is written and verified by AI and scripts. If you find an issue, we would appreciate you reporting it: the bug icon on the question card opens the report form, and so does /bugs.
No. Reading, planning, learning, quizzing and review all work without one. The first thing you save, starting a roadmap, a grade, a quiz, creates an anonymous account on our server; it is deleted after 180 days without a visit, and clearing cookies loses it. Register to keep it and to open it from another device.
Each grade, didn't recall or got it, nothing in between, updates an FSRS-6 model of that card on our server, which books the next look for when it estimates your recall would fall below your target, 90% by default. A miss brings the card back tomorrow; a pass moves it at least a day out, and further each time you keep recalling. Only a grade touches the schedule: got it in a learn sitting, either grade on a review card or on a topic page's mark row once a roadmap of yours covers the question; a quiz never does. It is the same scheduler with or without an account.
Mechanics, not promises: a question here is a card with a short answer, the one you would say aloud, a deep dive, a note per seniority band, follow-ups and red flags, and its own review schedule. The cards come ordered by roadmap per role, skill or tool, with sliders for how often a question is asked and the seniority it is pitched at, and everything but the account pages works without an account. The two cards on this page are real; judge it on those.
No. We do not sell, rent or share individual data, and there is no third-party ad tracking. We store what runs the product, account details, learning progress, session info, and send transactional email through our email provider. The privacy policy lists what is stored, how long it is kept, and how to delete it.
Coding exercises, system-design mock rounds, a code editor. Questions are knowledge questions you answer in words, system design included, as questions rather than mock rounds, plus a small behavioral set. Some topics have no questions yet and say soon on their roadmap page.

start with one roadmap.

no account to startregister to keep your progress