This question evaluates a candidate's understanding of graph shortest-path computation and meeting-point optimization, testing skills in handling weighted edges, aggregating path costs, and reasoning about simultaneous movements on a network.
You are given a connected graph representing travel between locations.
startA
.
startB
.
dest
.
They are allowed to meet at any node m (possibly startA, startB, or dest), and after they meet, they travel together from m to dest.
Assume:
Compute the minimum possible arrival time for both people to reach dest under this strategy.
Return the minimum arrival time (and optionally the meeting node m that achieves it).
n
nodes,
m
edges