Recursive bubble sort

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

hello @dar_angel007
please save ur code here-> https://ide.codingblocks.com/
and share the link.

also mention the line number in which u are facing issue.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.