How does output be
1 3 5 5 3 1 ?
Shouldn’t be 1 3 5 only ?
You may explain the underlying concept which I am missing?
&&
There is no video on Doubly Linked List and Efficient Doubly Linked Lists ? How do I study them?
How does output be
1 3 5 5 3 1 ?
Shouldn’t be 1 3 5 only ?
You may explain the underlying concept which I am missing?
&&
There is no video on Doubly Linked List and Efficient Doubly Linked Lists ? How do I study them?
@sanjit_15 You are slightly wrong . Answer will be 1 3 5 5 3 1 as the code backtracks back to the initial node. I think you are missing the print statment after the function call.
I am not able to understand how the cout statement after the function call execute because fun is called 3 times and when start points to 5, fun(start->next->next) == NULL and then it returns.
Yeah after returning it again prints the value of the node. Check that.
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.