Notice we also used a popTail method-- this function will be used for evicting nodes.
1popTail(node) {
2 const pre = this.tail.pre;
3 this.removeNode(pre);
4 return pre;
5}Notice we also used a popTail method-- this function will be used for evicting nodes.
1popTail(node) {
2 const pre = this.tail.pre;
3 this.removeNode(pre);
4 return pre;
5}