Uber Interview Question

BFS application in a grid structure.