Back to problems

Solve 15 common Apple coding questions

Algorithm · Apple · Medium

Below is the rewritten problem set. Each numbered part keeps the same task, input/output contract, and required complexity as before, but with fresh wording, fresh examples, and slightly different numeric bounds. Per-part constraints appear directly after the corresponding examples. Part 1: Design a Recency-Based Cache Implement an LRU cache simulator driven by a capacity and a list of operations. Every operation is either ('put', key, value) or ('get', key). Produce one…

Checking your access…