摘要: 二分法,先对行二分找出结果可能存在的行,再对这一行二分查找。O(Log m+Log n),m、n分别为矩阵的高和宽。 1 class Solution { 2 public: 3 bool searchMatrix(vector<vector<int>>& matrix, int target) { 阅读全文
posted @ 2019-05-02 02:49 NeoZy 阅读(155) 评论(0) 推荐(0) 编辑