Completed LeetCode problem #460 - LFU Cache

https://leetcode.com/problems/lfu-cache/description/

for the items with the same used frequency, the most recently used stay in the front.

used sequential method to locate the new position for an item so as to improve performance, the recursive method just sucked in performance!!!.


Comments

Popular posts from this blog

Completed the LeetCode #2 adding two numbers