Backtrack to previous configuration . Also restore 3 the previous indices , of one and two
arr [ i ] , arr [ indexone ] = arr [ indexone ] , arr [ i ] NEW_LINE updateindex ( index , one , indextwo , two , indexone ) NEW_LINE