← Microsoft questions
CodingMedium-Hard

Multi-source BFS Hospital

Filed under Microsoft

Given a graph and a set of nodes designated as hospitals, find the maximum time (distance) required for an ambulance to reach any non-hospital node from its nearest hospital. If a node cannot reach…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.