We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc39ed8 commit b409d38Copy full SHA for b409d38
1 file changed
src/main/java/com/crossoverjie/algorithm/TwoArray.java
@@ -0,0 +1,28 @@
1
+package com.crossoverjie.algorithm;
2
+
3
+import org.slf4j.Logger;
4
+import org.slf4j.LoggerFactory;
5
6
+/**
7
+ * Function: 在二维数组中判断是否存在查找的数字
8
+ *
9
+ * @author crossoverJie
10
+ * Date: 09/02/2018 22:19
11
+ * @since JDK 1.8
12
+ */
13
+public class TwoArray {
14
15
+ private final static Logger LOGGER = LoggerFactory.getLogger(TwoArray.class);
16
17
18
+ int[][] matrix = new int[][]{
19
+ {1, 2, 8, 9},
20
+ {2, 4, 9, 12},
21
+ {4, 7, 10, 13},
22
+ {6, 8, 11, 15}
23
+ };
24
25
+ int rows = matrix.length; // 数组的行数
26
+ int cols = matrix[1].length; // 数组行的列数
27
28
+}
0 commit comments