It's using prim's algorithm in Greedy Methods