Add Sprim spanning tree algorithm