4 ms·
Consider this kind of cycle: Head -> Node1 -> Node2 -> Node3 ^ | +-----------------+ If it's a circular list then yo
by Jtsummers 4y ago
Consider this kind of cycle:
Head -> Node1 -> Node2 -> Node3
^ |
+-----------------+
If it's a circular list then your option would work, but not all cycles will produce circular lists.
- quickthrower2 4y agoThanks. This seems so obvious now! Always draw it out I guess.