It has been pointed out that this is apparently similar to Djikstra's algorithm although when it was written the author wasn't aware of that.
The inspiration for the algorithm comes from a solution to a problem set in a mid 1980s edition of A&B Computing magazine.
Comments