摘要: 感觉学不懂了 寄 阅读全文
posted @ 2024-06-07 23:38 清川1 阅读(10) 评论(0) 推荐(0)
摘要: 1.和上一题主体部分一模一样,加了判断语句 2. int m = matrix.length, n = matrix[0].length; 二维数组的长度 3.List得实例化 1 class Solution { 2 public List<Integer> spiralOrder(int[][] 阅读全文
posted @ 2024-06-07 23:38 清川1 阅读(16) 评论(0) 推荐(0)
摘要: 1.二维数组声明 int[][] ans=new int[n][n]; 2. left <= right && top <= bottom 跳出循环条件 1 class Solution { 2 public int[][] generateMatrix(int n) { 3 int[][] ans 阅读全文
posted @ 2024-06-07 23:28 清川1 阅读(17) 评论(0) 推荐(0)
摘要: 1.难题 2.need.containsKey(r) 看hashmap中是否含有r 3.明天再复盘一遍 1 class Solution { 2 public String minWindow(String s, String t) { 3 if (s == null || s.isEmpty() 阅读全文
posted @ 2024-06-07 23:09 清川1 阅读(22) 评论(0) 推荐(0)