tvl-depot/scratch/data_structures_and_algorithms
William Carroll 155dff562a Impl part 3/3 for Memo
Refactor the caching policy for the Memo by evicting the elements that have been
the least-recently-accessed.

Python's heapq module default to a min-heap. By storing our heap elements
as (UnixTime, a), we can guarantee that when we call heappop, we will get the
element with the lowest UnixTime value in heap (i.e. the oldest). When we call
heappush, we use (time.time(), key) and these values -- by having the largest
UnixTime, will propogate to the bottom of the min-heap.
2020-07-01 15:13:56 +01:00
..
array-traversals.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
balanced-binary-tree.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
bit-manipulation.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
bracket-validator.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
bst-checker.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
cafe-order-checker.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
cake-thief.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
coins.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
conways-game-of-life.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
delete-node.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
dft.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
dijkstra-shortest-path.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
find-duplicate-optimize-for-space-beast.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
find-duplicate-optimize-for-space.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
find-rotation-point.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
find-unique-int-among-duplicates.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
fixtures.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
graph-coloring.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
graph-to-graphviz.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
highest-product-of-3.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
inflight-entertainment.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
knapsack-0-1.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
kth-to-last.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
largest-stack.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
linked-list-cycles.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
memo.py Impl part 3/3 for Memo 2020-07-01 15:13:56 +01:00
merge-sort.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
merging-ranges.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
mesh-message.gv Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
mesh-message.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
norman.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
nth-fibonacci.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
optimal-stopping.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
perm-tree.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
permutation-palindrome.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
permutations.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
plot.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
product-of-other-numbers.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
queue-two-stacks.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
rectangular-love.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
recursive-string-permutations.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
reverse-linked-list.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
reverse-words.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
second-largest-item-bst.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
shortest-path-inject-vertices.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
shuffle.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
string-reverse.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
temperature-tracker.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
test.txt Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
top-scores.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
topo-sort.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
trickling-water.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
which-appears-twice.py Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00