Circular linked list

we have to first make a cycle in the linked list and then detect and remove that cycle-----I am unable to understand what is wrong with my code----I have saved my code at the IDE https://ide.codingblocks.com/s/233729

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 …

just store alll the elements and start traversing the list until u get the element which has already occurred before.
https://ide.codingblocks.com/#/s/17565