Compute maze score using shortest path | Airbnb Coding Question