You are viewing a single comment's thread. Return to all comments →
Inside the while loop you are trying to access fast.next.next whose value could be null.
Seems like cookies are disabled on this browser, please enable them to open this website
Linked Lists: Detect a Cycle
You are viewing a single comment's thread. Return to all comments →
Inside the while loop you are trying to access fast.next.next whose value could be null.