Using a list and a hash-map, we can implement LRU in Java.
How would you implement an LRU cache in Java?
In C++, does std::list allow us to implement this?
For each element in cache, we need to know its position in the list. However, after removing a position, does list ensure that the positions (list::iterator) after this one will not be changed?