Cycle detection and removal


how to remove cycle?

hi @akshitabansal321 here you go

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

@akshitabansal321 cool then…