You are viewing a single comment's thread. Return to all comments →
Isn't this part badly written?
"head refers to the list of nodes 1 -> 2 -> 3 -> 1 -> NULL There is a cycle where node 3 points back to node 1, so return 1."
It says there is a cycle but from 1 it points to NULL,shouldnt instead return to the first value ,as in photos?
Seems like cookies are disabled on this browser, please enable them to open this website
Cycle Detection
You are viewing a single comment's thread. Return to all comments →
Isn't this part badly written?
"head refers to the list of nodes 1 -> 2 -> 3 -> 1 -> NULL There is a cycle where node 3 points back to node 1, so return 1."
It says there is a cycle but from 1 it points to NULL,shouldnt instead return to the first value ,as in photos?