The LRUCache class, which implements the Cache interface, does not properly maintain the least-recently-used…
The LRUCache class, which implements the Cache interface, does not properly maintain the least-recently-used…: a task in LegoFlow-SWE (Harbor dataset). After step 4, the entry "a" is evicted. Calling get("a") returns null , while "b" , "c" , and "d" remain in the cache. The cache has evicted the…
The task
After step 4, the entry `"a"` is evicted. Calling `get("a")` returns `null`, while `"b"`, `"c"`, and `"d"` remain in the cache. The cache has evicted the oldest *inserted* entry (`"a"`) instead of the least recently *used* entry (`"b"`).
Part of Lego-X/LegoFlow-SWE.