Skip to content

Commit fbd7755

Browse files
committed
Update time complexity table for LRU.
1 parent f6a0ed4 commit fbd7755

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/data-structures/lru-cache/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The functions `get()` and `set()` must each run in `O(1)` average time complexit
1616

1717
## Implementation
1818

19-
See the `LRUCache` implementation example in [LRUCache.js](./LRUCache.js). The solution uses a `HashMap` for fast `O(1)` cache items access, and a `DoublyLinkedList` for fast `O(1)` cache items promotions and eviction (to keep the maximum allowed cache capacity).
19+
See the `LRUCache` implementation example in [LRUCache.js](./LRUCache.js). The solution uses a `HashMap` for fast `O(1)` (in average) cache items access, and a `DoublyLinkedList` for fast `O(1)` (in average) cache items promotions and eviction (to keep the maximum allowed cache capacity).
2020

2121
![Linked List](./images/lru-cache.jpg)
2222

0 commit comments

Comments
 (0)