Skip to content

Commit b409d38

Browse files
committed
✨ 添加新特性
1 parent cc39ed8 commit b409d38

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)