void bubblesort2(int a[], int j, int n) {
if(n==1) {
return;
}
if(j==n-1) {
/* if i don't use the return keyword
below the program does not work why ?
same problem with the binarysearch*/
return bubblesort2(a, 0, n-1);
}
if(a[j] > a[j+1]) {
swap(a[j], a[j+1]);
}
bubblesort2(a, j+1, n);
} //
This is my code snippet
Why does the code not work if we donot use return statement in the line above which i have commented my issue