Cubic Interview Question

A binary search algorithm, SSSP