← Questions

Cache with a snapshot printer

0
HebbiaCodingLast asked Feb 2026

A coding interview question asked in Hebbia's onsite build day round, last asked Feb 2026. It tests lru cache, data structures and design.

Build a fixed-capacity cache that evicts the least recently used entry, then add a way to print its contents. In the second part, the printout is compressed: entries with the same value are grouped together.

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

  • Hebbia · Onsite build day · Last asked Feb 2026480 min · About eight hours in the New York office building and deploying an app from scratch from a set of requirements, then a demo to the team

What it tests

lru cache · data structures · design

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