how to remove cycle?
Cycle detection and removal
My code was also correct. Actually, on compiling it was showing “Cycle was present Linked List - 0 '”… seeing that i thought my code made the linked list 0’’ instead of linked list after removal of cycle and i started trying to find the mistake and didn’t submit, but your code showed the same output and i submitted your code, it passed all the test cases, then i submitted mine, it also passed all the test cases
1 Like