二维数组中的查找-golang
func searchArray(array [][]int, target int) bool {
if len(array) == 0 || len(array[0]) == 0{
return false
}
i, j := 0, len(array[0])-1
for i < len(array) && j >= 0{
if array[i][j] == target{
return true
}
if array[i][j] > target{
j--
continue
}
if array[i][j] < target{
i++
}
}
return false
}