Last time | Next time |
Grading 3, 24, 34 (may not be done...:(
I think that Ryan nailed it, however.
This was fun to program, but probably more trouble than it was worth. A direct approach, as in Bellman-Ford below, would have been simpler to code. But, if I can do something recursively, I probably will...:)
If you check out this code, you'll see where I compute the power set ("all-subsets") of a set, to cover all the bases. I think that the end result is pretty beautiful, too!
(coded up following our author's algorithm, in section 3.3, p. 214, as closely as possible).