void fun2(struct Node* head)
{
if(head== NULL)
return;
printf("%d ", head->data);
if(head->next != NULL )
fun2(head->next->next);
printf("%d ", head->data);
}
Here,for linked list 1->2->3->4->5->6
the output should be 5 3 1, right?
void fun2(struct Node* head)
{
if(head== NULL)
return;
printf("%d ", head->data);
if(head->next != NULL )
fun2(head->next->next);
printf("%d ", head->data);
}
Here,for linked list 1->2->3->4->5->6
the output should be 5 3 1, right?