Interview Guides
Given a binary matrix image of size m x n where 0 represents background and 1 represents foreground, return an m x n matrix dist where dist[r][c] is the minimum 4-directional distance from cell (r, c) to any background cell. Distances are measured using up, down, left, and right moves. If a cell is already background, its distance is 0.