/**
A SCLRUCache object is a collection-like container, or cache, that stores key-value pairs.
Eviction policy is based on the total cost.
- The client can specify a max allowed total cost the cache can hold.
- The client can specify cost for each individual key-value pair.
If the cache goes over its cost limit, discard the least recently accessed key-value pair first.
*/
// @interface SCLRUCache : NSObject
// API design goes here.
// @end
// @implementation SCLRUCache
// Implementation goes here.
// @end
// init cache; max allowed total cost 10
// add key0-value0; cost 5
// add key1-value1; cost
// add key2-value2; cost 3 -- evict key0
// init cache; max allowed total cost 10
// add key0-value0; cost 5
// add key1-value1; cost 5
// read key0 - returns value0
// add key2-value2; cost 3 -- evict key1