LeetCode "460. LFU Cache" !

My first try was very close to a final solution .. however, this is a much neater solution:

https://discuss.leetcode.com/topic/69436/concise-c-o-1-solution-using-3-hash-maps-with-explanation

Lesson learnt: data structure is crucial. And, if some logic is getting too complex, there must be sth wrong.

原文地址:https://www.cnblogs.com/tonix/p/6391048.html