leetcode 74. Search a 2D Matrix
来源:互联网 发布:java中如果不用static 编辑:程序博客网 时间:2024/06/05 09:45
class Solution {public:bool searchMatrix(vector<vector<int>>& matrix, int target){if (matrix.empty()){return false;}int row = matrix.size(), col = matrix[0].size();int i = 0, j = col - 1;while (i < row && j >= 0){if (matrix[i][j] == target){return true;}else{if (matrix[i][j] > target){j--;}else{i++;}}}return false;}};
0 0
- LeetCode 74. Search a 2D Matrix
- [LeetCode]74.Search a 2D Matrix
- LeetCode --- 74. Search a 2D Matrix
- [Leetcode] 74. Search a 2D Matrix
- [leetcode] 74.Search a 2D Matrix
- Leetcode 74. Search a 2D Matrix
- [LeetCode]74. Search a 2D Matrix
- 74. Search a 2D Matrix LeetCode
- [LeetCode]74. Search a 2D Matrix
- [LeetCode]74. Search a 2D Matrix
- leetcode 74. Search a 2D Matrix
- LeetCode 74. Search a 2D Matrix
- LeetCode 74. Search a 2D Matrix
- LeetCode *** 74. Search a 2D Matrix
- leetcode 74. Search a 2D Matrix
- LeetCode 74. Search a 2D Matrix
- leetcode-74. Search a 2D Matrix
- [leetcode] 74. Search a 2D Matrix
- 学习笔记——JavaWeb过滤器
- table td一行不能超过三个,超过的换行
- [Android新手学习笔记05]-如何进行活动Activity之间的跳转以及数据传递
- 让你尖叫的13种思维方式
- Range和Content-Range实体头
- leetcode 74. Search a 2D Matrix
- how to implement the version control of static files
- java 低版本运行环境执行高版本编译jar包
- 版本控制之git
- 阿里云ECS服务器在Mac下远程配置ftp服务器
- 机器学习(一)win10+python3.5安装numpy+MKL、scipy、matplotlib、scikit-learn
- 小虎OS(XiaoHuOS)打造自己的RTOS,基于stc12c5a60s2(51内核)的可剥夺多任务管理操作系统
- [Android新手学习笔记06]-活动Activity生命周期
- 一个Python程序员的进化(转)