Bubble sort recursion

I am not able to think the solution of these type questions like bubble sort using recursion on my own but I am able to understand it after watching the video,do I need to worry or do something about it

@Adhyayan,
No you don’t need to worry about anything.

To Solve any Problem related to Recursion All you need to do is Break the Problem into 3 important components which are as follows :-

1.Bigger Problem : The original Problem statement is your bigger problem.

2.Smaller Problem: In every recursive problem there exist a problem statement which you need to achieve in order to fulfill the problem statement but by considering such a smaller problem from the bigger problem is needed which we need to assume that the recursion will work and will give the answer.

3.Self Work: The amount of work which one should do in order to make the smaller problem your problem.

For e.g…, In order to find the max of any array, three components will be :

Bigger Problem : To find the max in whole array viz find max in array from index 0 to n - 1.

Smaller Problem: Assume that the recursion works and will find the max of array from index 1 to n - 1.

Self Work : In order to make your smaller problem your bigger problem all you need to do is to compare the ans return by assuming the smaller problem works with the 0th index element and return the max among both of them.

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.