Practice Problem

01 Matrix

Difficulty: Medium

Given a binary matrix, find the distance of each cell to the nearest 0 using multi-source BFS.