Checking Your Route
Checking Your Route is a Weride interviews coding interview problem. Given a weighted, bidirectional city graph, determine the shortest distance from node 1 to node n and identify all roads that lie on any shortest path. Return an array in input order with YES/NO for each road. A concise, practical interview question.
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:
