mirror of
https://github.com/TheAlgorithms/Java.git
synced 2026-03-13 08:40:43 +08:00
@@ -30,7 +30,7 @@ public class SaddlebackSearch {
|
||||
*/
|
||||
private static int[] find(int[][] arr, int row, int col, int key) {
|
||||
// array to store the answer row and column
|
||||
int[] ans = { -1, -1 };
|
||||
int[] ans = {-1, -1};
|
||||
if (row < 0 || col >= arr[row].length) {
|
||||
return ans;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user