Kruskals Algorithm Runtime Complexity While Loop