Tesla Interview Question

Shortest path in a matrix