Removal of cycle

I understood the concept behind the removal of cycle. But I am not able to code it.
Can you please help

Hey @Sachita3
Check this : Floyd's cycle removal part solution help

If u don’t understand something feel free to ask about it

I have done the dry run but I am not getting the correct answer

here is the picture of my dry run

Where? …

I am not able to add image as a reply that’s why I have posted another doubt in which I have posted the dry run image

Okay close this one ,we will continue there

Mark this as resolved