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