Initialize min value
min = 10000000 NEW_LINE min_index = 0 NEW_LINE for v in range ( V ) : NEW_LINE INDENT if ( mstSet [ v ] == False and key [ v ] < min ) : NEW_LINE INDENT min = key [ v ] NEW_LINE min_index = v NEW_LINE DEDENT DEDENT return min_index NEW_LINE