InterviewDB Question

City Path: Find the Shortest Path Between Cities in a Weighted Graph

Question Details

Problem You are given a list of roads between cities, each with a travel time. Find the minimum time to travel from a source city to a destination city. If no path exists, return -1. Example: Approach Dijkstra's algorithm with a min-heap. Time: O((V…

Full Details

🔒

Unlock full leaked content

Full insider details, leaked discussions, and candidate experiences.

Get Premium →

Topics

Coding Onsite Phone