Pinterest Interview Question

Leetcode hard matrix questions, find shortest path with some variants