โ† Goldman Sachs questions

Distance to nearest zero

Filed under Goldman Sachs

Given an M x N binary matrix where 0 represents a target and X represents a cell, find the distance of the nearest 0 for each cell.

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.