I tried to write code for recursively reverse a circular linked list. Though i am getting correct output, but i want to make sure that the code is fine or there is a better way to write this code? And am i missing something, like any corner cases etc?
Code: https://ide.codingblocks.com/s/604253
Recursive Reverse Circular Linked List
code is correct
one thing you can do is in base
// base case
if(temp==NULL || temp->next == head){
return temp;
}
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.