I am getting run error on submitting my code. Pls check the code. https://ide.codingblocks.com/s/107210
Circular Linked list run error
urvi the function u made when head is null to insert is havinf problem check this
Sir I have corrected that but there is some problem with the remove cycle function that I cannot figure out.
the problem is u r not making the cycle u r just inserting in the link list if a link list contain a cycle then it printing wil go infinitely as we will not find null anywhere as there is a cycle
so ur input function id not making cucle just inserting the values
like
1 2 3 4 5 2 3 -1
to create a cycle u need to point the pointer after 5 to 2 whivh has aleady come