Given a 2D matrix containing 0s and 1s and a starting coordinate, find the minimum time required to cover all 1s using BFS, returning -1 if any 1 is unreachable.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.