摘要: public static int[][] direction = new int[][]{{0,-1},{0,1},{1,0},{-1,0}}; public boolean exist(char[][] board, String word) { //dfs int m = board.leng 阅读全文
posted @ 2020-07-11 13:36 贼心~不死 阅读(122) 评论(0) 推荐(0) 编辑
摘要: public int minArray(int[] numbers) { //二分法 int n = numbers.length; int i = 0 , j = n -1; while(i < j) { int mid = i + ((j-i) >> 1); if(numbers[mid] > 阅读全文
posted @ 2020-07-11 13:06 贼心~不死 阅读(101) 评论(0) 推荐(0) 编辑
摘要: public boolean findNumberIn2DArray(int[][] matrix, int target) { int m = matrix.length; if(0 == m || null == matrix)return false; int n = matrix[0].le 阅读全文
posted @ 2020-07-11 10:03 贼心~不死 阅读(100) 评论(0) 推荐(0) 编辑