Compute maze score using shortest path | Airbnb Interview Question