Computer Science, asked by pinakinandanparya95, 2 months ago

Write an algorithm to copy a circular linked list.

Answers

Answered by DJchicky77
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 Anonymous
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