Skip to content

Commit ab9c7af

Browse files
committed
makes LRUCache constructor concrete
1 parent 5c8a6c8 commit ab9c7af

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

other/least_recently_used.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import sys
2-
from abc import abstractmethod
32
from collections import deque
43

54

@@ -10,7 +9,6 @@ class LRUCache:
109
key_reference_map = object() # References of the keys in cache
1110
_MAX_CAPACITY: int = 10 # Maximum capacity of cache
1211

13-
@abstractmethod
1412
def __init__(self, n: int):
1513
"""Creates an empty store and map for the keys.
1614
The LRUCache is set the size n.
@@ -54,6 +52,7 @@ def display(self):
5452

5553

5654
if __name__ == "__main__":
55+
5756
lru_cache = LRUCache(4)
5857
lru_cache.refer(1)
5958
lru_cache.refer(2)

0 commit comments

Comments
 (0)