← Questions

Weighted cache that evicts the heaviest entries

0
NetflixCodingLast asked Nov 2026

A coding interview question asked in Netflix's coding / problem solving round, last asked Nov 2026. It tests design, heap and hash map.

Implement WeightedCache, a key-value cache with a total-weight budget instead of an item count. Each entry has a positive integer weight.

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

design · heap · hash map · cache

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