LRU Cache Visualizer

HT

Operations

Map [ Cache Size: 3 ]

<Key, Value>Node Address
Map is empty.

Algorithm

  1. Is `key` present in the map?
  2. Update the node value
  3. Put the node after head
  4. Update the Map
  5. Is map size < cache size?
  6. Create & Insert the node after head
  7. Update the Map
  8. Else
  9. Delete the node before End node
  10. Update the Map
  11. Create & Insert the node after head
  12. Update the Map