Databricks Interview Question

Leetcode medium - hard level, some shortest path question