static class Node{ int key,value; Node pre,next; public Node(int key, int value){ this.key=key; this.value=value; } } private HashMap<Integer,Node> lru = new HashMap<>(); private Node head = new Node(-1,-1); private Node tail = new Node(-1,-1); private int...