← Goldman Sachs questions

Find element in 2D Matrix using binary search

Filed under Goldman Sachs

Given an m x n matrix where each row is sorted in ascending order and the first integer of each row is greater than the last integer of the previous row, find if a target value exists.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Goldman Sachs questions

Collected from public candidate posts and coding forums. Updated Nov 2026.