ThoughtExchange Interview Question

Grid manipulation and graph traversal