Search a Sorted Grid

Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.

The problem

  • medium
  • Pro

A grid of integers is sorted so that each row runs from smallest to largest, and the first number of each row is larger than the last number of the row above. Decide whether a target is in the grid, and explain how to search it in logarithmic time.

Talk this problem through with an AI coach

This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.

Start free →