【每日一题】3.22 earch-a-2d-matrix


亲爱的牛客们~


又到了【每日一题】的时候啦,昨天的题目你思考的肿么样了呢?
大家不妨练习一下,欢迎来讨论区和大家一起讨论哟~


今天的题目是这样滴:

【每日一题】0322



[编程题]search-a-2d-matrix



Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:


  • Integers in each row are sorted from left to right.
  • The first integer of each row is greater than the last integer of the previous row.


For example,

Consider the following matrix:

[
  [1,   3,  5,  7],
  [10, 11, 16, 20],
  [23, 30, 34, 50]
]

Given target =3, returntrue.




大家可以在下面链接直接在线编程训练哦:


戳这里在线练习哦


欢迎大家认真思考,积极讨论~ 

也欢迎高手们把题目翻译成中文,翻译的“信达雅”有奖哟~




全部评论

相关推荐

03-30 19:30
石家庄学院 Java
野蛮的柯基在游泳:都能入股了,还得是Java
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务