摘要: #### 在一个行和列都是依次递增的矩阵(这里是二维数组)中,如何设计一个时间复杂度为O(n)的算法,判断矩阵中是否存在元素x? int find_x(vector<vector<int>> &m,int x){ // 列数 int c = m[0].size()-1; // 行数 int r = 阅读全文
posted @ 2022-07-24 18:42 nanfengnan 阅读(24) 评论(0) 推荐(0) 编辑