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 BinaryHeap of timestamps
B
A HashMap alone
C
HashMap<K, usize> pointing into a Vec-backed doubly linked list of nodes (indices as prev/next)
D
A sorted Vec