C3 AI Interview Question

bfs a matrix, traverse a map