I need to get the cache complexity O(log (n)). It is said that this complexity allows for map and list. For example, the implementation of:
http://blackcat.ca/svn/trunk/lru_cache/src/lru_cache.h
But in this algorithm are present such operations with the list: List.splice() - Complexity O(n). List.erase() - Complexity O(n).
Here people say that map and list will the complexity of O(log(n)). https://stackoverflow.com/a/3640392/3274299
Why O(log(n))? There must be O(n).