Module 10 · System Design · Six more low-level rounds
Design an LRU cache (a map and a list that keep each other honest)
Design an LRU Cache · Open board
The desk and the file room, three eviction rules on the same twelve requests, the map and the list side by side, and the two follow-ups.
Before you start. You need two lessons. The object that keeps its own rules (encapsulation and invariants) showed an invariant: a promise about an object’s insides that every method must leave true, which is why the outside world never touches the insides. Design a parking lot (the first whole round) showed a whole round in order: ask, find the entities, sketch the classes, write the tricky part, take the follow-up, mention the lock. This lesson runs that round on a smaller problem with a sharper trap. You also need to read a little Python.
Lesson 45 of 73 in System Design
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year, or $19.50 for your first year with LAUNCH50, ends 1 Nov, 18:30 UTC.