solulubeta
Sign in
NeetCode 150 / Binary Search
05.02 · Problem

Search a 2D Matrix

Medium Binary search over a flattened index 1 video LC 74 Pro

This problem is part of solulu Pro

An m × n matrix has each row sorted left to right, and the first value of each row is greater than the last value of the previous row. Return true if target is in the matrix, in O(log(m·n)) time.

Lifetime ₹1,999 ₹999 · Launch offer
Mark this problem as solved when you are finished.

Item 29 of 150 · updated 2026-10-12