I was asked to create a circular linked list of names . My doubt is whether I can use two pointers , one to point to the first node in the list(start and other to the last node) or not! Is the use of two pointers against the whole idea of a circuluar linked list ? If that is the case , then how can I make the last node point to the start without traversing everytime while adding new nodes

Is the use of two pointers against the whole idea of a circuluar linked list ?

Not at all. As long as the end of the list points back to the beginning, it's a circular list. You can certainly use an end pointer to simplify the implementation without making it a double linked list and adding the potentially significant overhead of an extra pointer per node.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.