How to do this?

We are given a linked list which contains a cycle. Detect that cycle and break it. Print the linked list after removing the cycle

hi @hg11110000, there is a specified algorithm for this problem that you should know by heart known as Floyd Cycle Detection Algorithm so i will highly suggest you to watch the vedio on that first.
other resource you can refer :-

In case of any doubt feel free to ask :slight_smile:
mark your doubt as resolved if you got the answer

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.