Traversing in Circular Singly linked listTraversing in circular singly linked list can be done through a loop. Initialize the temporary pointer variable temp to head pointer and run the while loop until the next pointer of temp becomes head. The algorithm and the c function implementing the algorithm is described as follows. Algorithm
WRITE "EMPTY LIST" [END OF LOOP] C FunctionOutput 1.Append List 2.Traverse 3.Exit 4.Enter your choice?1 Enter the item 23 Node Inserted 1.Append List 2.Traverse 3.Exit 4.Enter your choice?2 printing values ... 23
Next TopicDoubly Linked List
|