0

i want to know the program how to insert at the beginning of a circular linked list in C.

4
Contributors
4
Replies
5
Views
11 Years
Discussion Span
Last Post by subhashkataria2
0

>i want to know the program how to insert at the beginning of a circular linked list in C.
Guess what? There is no beginning to a circular linked list. That's why it's called a circular linked list: because it is.

0

if u r askin for a code to insert a node before head node then
first create a temporary node, traverse the list using a condition "while(next->link!=head)", then assign the address of temporary node to next->link then shift next to this temporary node and at last assign the address of head to link part of this node, shift head at temporary node.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.