LRU cache where each item counts by its quantity
Implement an LRU cache in which every item carries a quantity, and capacity is measured in total quantity rather than number of items. A put may evict several least recently used items to make room. Handle updating an item's quantity and an item larger than the whole capacity.
No answer yet. Write the first one; the best answer gets endorsed.
