← Amazon questions
CodingReported in a candidate post, Mar 2021

Implement a cache with get() and set()

Filed under Amazon

Implement a fixed-capacity cache that supports two operations: get(key) returns the value for the key, or -1 if it is not present; set(key, value) inserts or updates the key. When the cache is at…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.