1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/排序矩阵查找 [sorted-matrix-search-lcci].html
2022-03-29 12:43:11 +08:00

19 lines
489 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>给定M&times;N矩阵每一行、每一列都按升序排列请编写代码找出某元素。</p>
<p><strong>示例:</strong></p>
<p>现有矩阵 matrix 如下:</p>
<pre>[
[1, 4, 7, 11, 15],
[2, 5, 8, 12, 19],
[3, 6, 9, 16, 22],
[10, 13, 14, 17, 24],
[18, 21, 23, 26, 30]
]
</pre>
<p>给定 target&nbsp;=&nbsp;<code>5</code>,返回&nbsp;<code>true</code></p>
<p>给定&nbsp;target&nbsp;=&nbsp;<code>20</code>,返回&nbsp;<code>false</code></p>