题解 | #二维数组中的查找#
二维数组中的查找
https://www.nowcoder.com/practice/abc3fe2ce8e146608e868a70efebf62e
c语言
bool Find(int target, int** array, int arrayRowLen, int* arrayColLen ) {
for(int i = 0; i < arrayRowLen; i++){
for(int j = 0; j < *arrayColLen; j++){
if(array[i][j] == target){
return true;
}
}
}
return false;
}
查看15道真题和解析