Optimal Commute Route

Given an n x m grid where S is the start, E is the destination, . is a passable cell and # is an obstacle. You can move one cell up, down, left or right at a time.

There are 4 transport mod...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: