Write an algorithm to copy a circular linked list.
Answers
Answered by
0
Answer:
Allocate the new Node in the Heap using malloc() & set its data. Recursively set the next pointer of the new Node by recurring for the remaining nodes. Return the head pointer of the duplicate node. Finally, print both the original linked list and the duplicate linked list.
Answered by
2
Allocate the new Node in the Heap using malloc() & set its data. Recursively set the next pointer of the new Node by recurring for the remaining nodes. Return the head pointer of the duplicate node. Finally, print both the original linked list and the duplicate linked list.
hope it helps uu
Similar questions