File tree Expand file tree Collapse file tree
algorithms/java/src/searchA2DMatrixII Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 *
2323 * Given target = 20, return false.
2424 *
25- * Notice:
25+ **********************************************************************************/
26+ package searchA2DMatrixII ;
27+ /**********************************************************************************
2628 * This probleam is similar to problem 74(https://leetcode.com/problems/search-a-2d-matrix/description/).
2729 * One solution is:
2830 * Compare rightTopNumber with target to judge rowIndex and colIndex which place to move,
2931 * until thay out of range or find target.
3032 * Another solution is using binarySearch.
3133 **********************************************************************************/
32- package searchA2DMatrixII ;
33-
3434public class SearchA2DMatrixII {
3535 public boolean searchMatrix (int [][] matrix , int target ) {
3636 if (matrix == null || matrix .length == 0 || matrix [0 ].length == 0 ) {
You can’t perform that action at this time.
0 commit comments