Loading the puzzle…
The puzzle IDE is built for a laptop or larger screen. You can read everything here, but selecting code is easier with a mouse and a wider window.
Interview question: design a least-recently-used (LRU) cache with a fixed capacity, where reading a key makes it the most recently used one.
Jinja keeps loaded templates in such a cache, LRUCache in src/jinja2/utils.py.
Its __getitem__ is called for a key that is in the cache but is not the most
recently used one. With n keys in the cache, what does that call cost, and why?
Select one option.
One of the listed options.
Each hint revealed before you solve takes 20 points off this puzzle's score.
Solve this puzzle to see the solution and a full explanation.
Pick one of the options.