Wrong output is coming
Doubt circular linked list
@sulbh579
hi
see, the problem is that the i/p u are taking is for a linked list without loop, like u can numerically see that there is a loop but in the code we are not linking thew nodes to each other
so basically, in the detect&remove loop function there is no point where fast becomes equal to slow
if u have gone through gfg LL question then they explicity make the loop like they define it in that was,
so here we arent doing anything like that
so bascially u can check if u are applying the correct logic or not.
making links wonnt fetch u much reward, its time investing
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.