package notes.Sorting;
public class binarySortusingRec {
public static void bubbleSort(int[] a,int si,int li)
{
if(si==li)
{
bubbleSort(a,0,li-1);
return;
}
if(li==0)
{
return;
}
if(a[si]>a[si+1])
{
int temp=a[si];
a[si]=a[si+1];
a[si+1]=temp;
}
bubbleSort(a,si+1,li);
return;
}
public static void main(String[] args) {
// TODO Auto-generated method stub
int[] a= {88,66,55,44,33};
bubbleSort(a,0,a.length-1);
for(int i : a)
{
System.out.print(i +" ");
}
}
}