码迷,mamicode.com
首页 > 系统相关 > 详细

LeetCode "460. LFU Cache" !

时间:2017-02-12 15:44:20      阅读:253      评论:0      收藏:0      [点我收藏+]

标签:structure   http   hash   code   maps   first   gic   com   eve   

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.

LeetCode "460. LFU Cache" !

标签:structure   http   hash   code   maps   first   gic   com   eve   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!