比较菜,就直接使用现成的数据结构LinkedHashMap。题解就直接写在注释上了。 import java.util.*; public class Solution { /** * lru design * @param operators int整型二维数组 the ops * @param k int整型 the k * @return int整型一维数组 */ int cap; // 缓存容量 LinkedHashMap<Integer,Integer> cache = new LinkedHa...