Homework 8 Solutions

You left out the part that actually adds the edges, what you wrote only updates existing edges.