Practice
Learn
← Quit
0 / 0 correct
Rust
Hard
1 of 40
How would you implement an O(1) LRU cache in Rust without unsafe?
A
A sorted Vec
B
HashMap<K, usize> pointing into a Vec-backed doubly linked list of nodes (indices as prev/next)
C
A HashMap alone
D
A BinaryHeap of timestamps