Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
Jtsummers
· 4y ago · 0 comments
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.
Comments
[–]
quickthrower2
4y ago
Thanks. This seems so obvious now! Always draw it out I guess.