剑指offer面试题4:二维数组中的查找(比较直白简单)

题目见书《剑指offer》44页; 编程思路:将所输入数字与二维数组中的数字进行比较,若是相等则返回1,不相等则返回0,运用了遍历的思想,未用到指针。ios #include <iostream> using namespace std; bool find(int a[4][4], int number) { int i, j; bool found = false; for (i =
相关文章
相关标签/搜索