Implement a node class of create a linked list un reverse.then it traverses the list printing each integer data value.
Answers
Answered by
0
Answer:
Start traversing th singly linked list in the forward direction . As you visit every node in the linked list reverse the direction of the links.
...
To traverse in forward direction.
Int traverse(struct node* l)
{ struct node *p;
p=l;
If (l==NULL)
return 1;
else.
{ printf(“%d->”,p->info);
return traverse(p->next);} }
Similar questions