We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
you should check "fast != null" first because if fast is null then as per your condition it will be like "null.next != null"
and you can't check null.next that is why its not working.
Cycle Detection
You are viewing a single comment's thread. Return to all comments →
you should check "fast != null" first because if fast is null then as per your condition it will be like "null.next != null" and you can't check null.next that is why its not working.