Reversing the linked_list

please check the code for the insertinmiddle function and recurisive_reverse function in the code

hi @tharun
for insertinmiddle function
you write : while(jump<=p-1){
instead of this you have to write
while(jump<p-1){

you can check this by taking an examle

and for recursive_reverse function
if(head->next!=NULL||head==NULL){
return head;
}
you use this condition as base case
and this is always true for non-empty linked list (as head->next!=NULL) so function return and no changes will happen

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.