Linked list and floyd cycle

please tell the code to remove the cycle

You can check this code out. It is floyd cycle detection and removal. It’ll first check if cycle is present or not, if present it’ll remove the cycle.
Hope this helps.