can you explain the use of
C=C->N->N
Can you explain the use of C=C->N->N
see
when we call from reverseRec(2-.>next) then on this step we have 3 whose next is null so we return to previous step
at this point we have
head = 2
smallHead =3
C = head this means C = 2
c->next->next means
2->next->next == (3 ->next = C)
so now 3->next= 2
so bascially u are changing the pointer of curr->next to the curr node using c->N->N =C
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.