Tiger_pop's Blog

tiger_pop 的博客

  • 首页
  • 关于
  • 标签
  • 分类
  • 归档
  • 文章目录
  • 站点概览
陈宇韶chenyushao

陈宇韶chenyushao

爱学习、爱工作、爱生活; 微信号: Tiger_and_master; 手机号码:18515678348
434 日志
27 分类
215 标签
0%

240. 搜索二维矩阵 II

发表于 2021-12-17 更新于 2025-01-05 分类于 leecode刷题复习
这是文章开头,显示在主页面,详情请点击此处。
1
2
3
4
5
6
7
class Solution:
def searchMatrix(self, matrix: List[List[int]], target: int) -> bool:
for row in matrix:
idx = bisect.bisect_left(row,target)
if idx>=0 and idx<len(row) and row[idx]==target:
return True
return False
257. 二叉树的所有路径器
235. 二叉搜索树的最近公共祖先
© 2026 陈宇韶chenyushao
由 Hexo & NexT.Muse 强力驱动