search-a-2d-matrix

This commit is contained in:
Gleb Koval 2022-06-02 23:44:07 +01:00
parent 06fe666bcd
commit 17e37c823d
Signed by: cyclane
GPG Key ID: 15E168A8B332382C
1 changed files with 5 additions and 0 deletions

View File

@ -0,0 +1,5 @@
impl Solution {
pub fn search_matrix(matrix: Vec<Vec<i32>>, target: i32) -> bool {
matrix.concat().binary_search(&target).is_ok()
}
}