Databricks Interview Question

Find shortest path in a 2'd sorted array