Recursion - II first occurence

why sir is passing the array by value (i.e. int *a) in every function instead of passing it by reference (i.e. int a[ ]) ?

Hello @rahulkumarraj220 it depends on the constraints if it is for normal testing and the test cases are not large then you can pass it by value aswell.
because it will not give you TLE.
however,it is always recommended to pass by reference only.
just keep this in mind:
Happy Learning!!

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.