摘要: 一:之前旧的写法 class Singleton{ private Singleton() {} private static Singleton instance = null; public synchronized static Singleton getInstance() { if (in 阅读全文
posted @ 2022-01-08 21:04 ou尼酱~~~ 阅读(428) 评论(0) 推荐(0)
摘要: 这是一道模拟题,模拟这个绕着边界走的过程就可以了。 第一种办法很直观,用四个变量规定好最外围那一圈的行和列的上界和下界。代码如下: List<Integer> list = new LinkedList<>(); int a = 0, b = matrix[0].length - 1, c = 0, 阅读全文
posted @ 2022-01-08 11:22 ou尼酱~~~ 阅读(101) 评论(0) 推荐(0)