Airport Limousine (Maximum Passengers Collected) (Also for Core/Database Intern :)
Problem Overview
- Find the max passengers a taxi can collect on a round trip from (0,0) to (n-1,n-1) on an n×n grid.
- Cells: -1=obstacle, 0=path, 1=passenger; move right/down out, left/up back; return an int; if no path, 0.
- Real-world: airport limousine to a railway station, picking up riders on the way.
- Snowflake coding interview problem; common interview question for Core/Database Interns.
- Constraints: 1<=n<=100; values in [-1,1].
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
