function to count the number of nodes in a doubly circular linked list
Answers
Answered by
4
- Create a Circular Linked List and assign reference of first node to head .
- Initialize count = 0; variable to store total nodes in list.
- Initialize another variable to traverse list, say current = head; .
- Increment count++ and current = current->next;
Similar questions