Samsung Electronics Interview Question

Graph question based on shortest path algorithm.