We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04f4933 commit f9ac741Copy full SHA for f9ac741
Sprint-2/implement_lru_cache/lru_cache.py
@@ -67,3 +67,5 @@ def set(self, key, value): #Insert/update value and handle eviction
67
# Remove least recently used node
68
tail = self.dll.pop_tail()
69
del self.cache[tail.key]
70
+#Time Complexity = O(1) since each operations have the same O(1) complexity
71
+#Total Space complexity is O(n) i.e. One node and one dictionary entry per cached item
0 commit comments