The user enters
1 2 3 4 5 3 4 5 -1
When building a Circular Linked List, there will be no link between the next of 5 and 3.
So in order to remove the circular link,
Do we have to create a circular linked and then break the link?
the link of my code :
Doubt in Circular Linked Lists
You just keep taking inputs in the same manner as you did in the others(i.e. insertion at the tail) until you get an element which is already present in the list , in such case you need to check wheather the further elements are same if yess then point the last node to the matching node , else keep taking input .
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.