Change the index of the element which was at position 0. Swap the element basically .
int element = arr [ best_index ] ; h [ element ] = initial_index ; swap ( arr [ best_index ] , arr [ initial_index ] ) ;