Amazon Interview Question

A graph question for finding smallest path to hospitals.