by quickthrower2 · 4y ago · 0 comments
Or to save the comparisons make the thing the first node points to have a stop flag of some sort.
Head -> Node1 -> Node2 -> Node3
^ |
+-----------------+
If it's a circular list then your option would work, but not all cycles will produce circular lists.