what will be the time complexity for such recursive sortings?
Cpp- Recursion Bubble Sort
Hi @a19JE0093
In recursive bubble sort, for a particular element we are calling the same function again and again and in that function we traverse the length of the array, hence time complexity is O(n*n) = O(n^2).
Hope it Helps.
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.
1 Like