Slug: lru-index-01 · Paired reading: Chapters 26 and 21
Prompt
Index-linked list LRU: Node { key, value, prev, next } plus
HashMap key→idx and head/tail. get / insert with capacity eviction.
Safer than raw pointers.
The curriculum, drills, tutor, and interviewer mode are for readers of Ace the Rust Interview. The code is printed in the Preface (Companion site access).
Don’t have the book yet? The landing page stays open — purchase unlocks this gym.
advanced · order 167
Slug: lru-index-01 · Paired reading: Chapters 26 and 21
Index-linked list LRU: Node { key, value, prev, next } plus
HashMap key→idx and head/tail. get / insert with capacity eviction.
Safer than raw pointers.