Doubt in Floyd Cycle Algorithm

i am not able get answer.Can you pls help me with this

hello @dare_devil_007

the list contains cycle.
so thr trivial method for building list will not work.

submit it here ->https://hack.codingblocks.com/app/contests/1350/1307/problem
input output is already handled u just have to write ur logic for dectection and removal.

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.