lan-dian

Results 6 comments of lan-dian

看了东哥的LRU想着LFU也能手写出来,没想到花了一个多小时哈哈。 下面是我的代码,和东哥的思路不一样。 ```java class LFUCache { LinedList list; public LFUCache(int capacity) { list = new LinedList(capacity); } public int get(int key) { return list.get(key); } public void put(int key, int...

为什么是C-A,C-C之后一直C-V呢,如果再一定数量的时候,再拷贝一次,底数应该就翻倍了,效果后续肯定能超过一直C-V,如果在txt里面凑字数的话,肯定能感受出来的。

一旦我们C-A,C-C了一次之后,就没有按下A的必要了,因为C-V肯定比A多,我们考虑的肯定是什么时候,采用C-A,C-C增倍

内存超出了,有大佬帮我看看为什么吗? ```java class Solution { public List allPathsSourceTarget(int[][] graph) { List sup = new ArrayList(); sup.add(0); getPath(0,graph,sup); return res; } List res=new ArrayList(); public void getPath(int point,int[][] graph,List sup){ boolean...

@EarthChen can you help me approve this,thanks.