News

So all shortest paths must be of length at most k. <BR><BR>One solution, which works well for small k, is to run the Bellman-Ford algorithm (slightly modified) for k steps. This takes O (km) time.