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.
The node is an specific object in the memory so it is unique, the only option where it would not work, would be if you are iterating 2 lists and they merge at some point, so you would have the same object in both lists or the same memory addres.
Cookie support is required to access HackerRank
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 →
The node is an specific object in the memory so it is unique, the only option where it would not work, would be if you are iterating 2 lists and they merge at some point, so you would have the same object in both lists or the same memory addres.