InterviewDigestInterviewDigest

OA Practice Workspace

Technical2026-08-12

Search in sorted matrix 2

AI-Expanded — inferred from the question title, not from the original candidate report

Given an $m \times n$ matrix where each row is sorted in ascending order from left to right and each column is sorted in ascending order from top to bottom, write an efficient algorithm to determine if a specific target value exists within the matrix. Your solution should leverage the sorted properties of the grid to achieve a time complexity better than a linear scan, such as $O(m + n)$.

Context & Summary

Introduction and discussion of work experience

💻 Coding practice works best on desktop.
Code editors are too cramped on mobile screens.