it shuld n^2 or more then it???
What would be complexity in this recursive bubble sort?
We are calling the same function recursively for each element of the array and inside the function, we are looping till the given length of the array, So Time complexity is O(n ^ n) = O(n ^ 2).
We are recursively calling the function for each element of the array, So space complexity is O(n).