Minimum spanning tree course design (perfect reference) - I am trying to build (pure C language version)