← Goldman Sachs questions
CodingReported in a candidate post, Jul 2025

Pseudocode for an MRU cache using a stack

Filed under Goldman Sachs

Write pseudocode for a most-recently-used (MRU) cache with a fixed capacity, supporting get(key) and put(key, value), using a stack to track the order of use. When full, the most recently used item is…

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 Goldman Sachs questions

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