In the recursive call we are passing (a+1) then why are we comparing a[0] < a[1] ?
Why are we checking a[0] > a[1]
a[0] and a[1] means 0th and 1st index of array
as we are passing a+1 so every time first value will change
hence a[0] and a[1] is correct
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.