public static void main(String[] args) { // TODO Auto-generated method stub int[] array = { 4, 3, 4, 2, 3, 1, 4, 2 }; int max = 3; LRUcache MemoA = new LRUcache(max); for (int i = 0; i < array.Length; i++) { //MemoA.set(array[i], i); //outputlist(); } /* * int findx = MemoA.get(4); * if(findx == -1) * System.out.println("Do not have now"); * else * { * System.out.println("result is: "+findx); * outputlist(); * } * */ }
public static void main(String[] args) { // TODO Auto-generated method stub int[] array = {4,3,4,2,3,1,4,2}; int max = 3; LRUcache MemoA = new LRUcache(max); for(int i = 0; i < array.Length; i++) { //MemoA.set(array[i], i); //outputlist(); } /* int findx = MemoA.get(4); if(findx == -1) System.out.println("Do not have now"); else { System.out.println("result is: "+findx); outputlist(); } * */ }