[Algorithm] update shortest path