import static java.lang.System.*;
public class Program {
public static void main(String[] args) {
int[] intArr={5,9,1,4,1,2,6,3,8,0,7};
insertSort(intArr);
}
public static void main(String[] args) {
int [] arrs = {5,9,1,4,1,2,6,3,8,0,7};//new int[5][3];
mySort(arrs,0,arrs.length-1);
display(arrs);
}
public static void mySort(int [] arrs,int low,int high){
int lo=low;
int hi=high;
if (lo>=hi) {
return;
}else{
boolean flag=false;
while (lo<hi) {
if (arrs[lo]>arrs[hi]) {
int temp=arrs[lo];
arrs[lo]=arrs[hi];
arrs[hi]=temp;
flag=!flag;
}else{
if (flag) {
lo++;
}else{
hi--;
}
}