Partial implementation.
Code to construct graph.
A bug fix in graph construction.
Code for problem 37E.