Added Prims C++ implementation.