← 返回 linkedin 的题目列表KV Cache Implementation with Eviction
类型:online_judge
linkedin
Implement a KV Cache with an eviction strategy. Provide CONSTRUCT and GET methods. Design a method to evict data based on Rank using a MinHeap.
Example
Input
3
put 1 1
put 2 2
get 1
put 3 3
put 4 4
get 2