Modified Kruskals. Steps 1-3 works for basic cases
added extra contructor for GraphHashTable