Frage im Vorstellungsgespräch bei Samsung Electronics

Graph question based on shortest path algorithm.