← Questions

Blocking cache where reads wait for a missing key

0
DatabricksCodingLast asked Jul 2026

A coding interview question asked in Databricks's algorithms (two rounds) round, last asked Jul 2026. It tests concurrency, hash maps and queues.

Build a keyed cache whose reads can wait. get(key) returns at once when the key is present; otherwise it blocks until some thread writes that key. put(key, value) stores or replaces the value and wakes every reader waiting on that key, in…

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

What it tests

concurrency · hash maps · queues

Your code and the AI tutor open when you unlock this question.