Swapping
if ( heap [ left1 ] < heap [ right1 ] ) : NEW_LINE INDENT tmp = heap [ index ] ; NEW_LINE heap [ index ] = heap [ left1 ] ; NEW_LINE heap [ left1 ] = tmp ; NEW_LINE index = left1 ; NEW_LINE DEDENT else : NEW_LINE INDENT tmp = heap [ index ] ; NEW_LINE heap [ index ] = heap [ right1 ] ; NEW_LINE heap [ right1 ] = tmp ; NEW_LINE index = right1 ; NEW_LINE DEDENT