This element can be inserted to the left of the previous element , only if it is lesser than the previous element and in the range .
else if ( arr [ i ] < arr [ i - 1 ] && arr [ i ] > min && arr [ i ] < max ) {