DoorDash Interview Question

Problem similar to Leetcode Walls and Gates