I am not able to do this question by recursion this is my code how to improve my code?

Question is not visible to me, If you could provide me the link of question or, wait till it becomes visible.

@kailash_01 you were not passing the size of array to the function, (array is passed by reference so using size we cannot get the size of array).
You had made a bool function but was not returning anything.
You were comparing m with a[0] irrespective of the value of i.
There as no check condition to ensure that you are not printing many times.


Here is the updated code, i have corrected your mistakes. If this solves your doubt mark it as resolved.

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.