Computer Science, asked by lpooranidevi2004, 8 days ago

how to convert a single linked list to circular list​

Answers

Answered by deepak1463
5

Explanation:

To convert a singly linked list to circular linked list, we will set next pointer of tail node to head pointer.

1. Create a copy of head pointer, let's say "temp".

2. Using a loop, traverse linked list till tail node(last node) using temp pointer.

3. Now set the next pointer of tail node to head node. (temp->next = head;

Similar questions