[Solved] Without binarysearch,how can I do a search in matrix? [closed]


Your question is really vague. Rather than coming here asking a vague question you should provide some code snippets, explain what your have tried and what is going wrong. This will help people answer your question, and not down-vote your question to hell (like what is happening now).

With that being said i’ll take a stab at what you came here looking for:

int[][] matrix = new int[sizeX][sizeY]

for (int i = 0; i < matrix.length; i++) {
    for (int j = 0; j < matrix[i].length; j++) {
        //do matrix processing here with matrix[i][j]
    }
}

2

solved Without binarysearch,how can I do a search in matrix? [closed]