Back to course home
0% completed
Vote For New Content
Search a 2D Matrix II (medium)
Problem Statement
Given a 2D grid of size m x n matrix containing integers, and integer target, return true if target value exists in the matrix. Otherwise, return false.
The matrix has the following properties:
- Values in each column are sorted in
non-decreasing orderfromtop to bottom. - Values in each row are sorted in
non-decreasing orderfromleft to right.
Examples
Example 1:
- Input: target = 5, matrix =
[[1,2,3],
[4,5,6],
[7,8,9]]
- Expected Output:
true
.....
.....
.....
Like the course? Get enrolled and start learning!
Table of Contents
Contents are not accessible
Contents are not accessible
Contents are not accessible
Contents are not accessible
Contents are not accessible