Unable to break the LinkList

Why this code is not working any hint?

hello @1997gautam.shah
ur way of building linked list is not correct.
we cannot use our trivial method for list construction because we have circular linked .

pls submit ur problem here
.https://hack.codingblocks.com/app/contests/1680/1307/problem

input output is already handled u only need to apply ur algorithm.

Okay fine. But how to deal this question Circular Linklist

both are same question…

Okay…

Unable to pass three testcases? Any hint? https://ide.codingblocks.com/s/284836

image

this condition will fail when linked list wil have only one node.
use boolean variable.

i have made the required changes pls check ->
https://ide.codingblocks.com/s/285226

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.