Solved LeetCode program · 141 of 1,000
#0141 · Linked List Cycle
Original English source
The values is a list of 3, 2, 0, and -4. The nexts is a list of 1, 2, 3, and 1. The visited is a list of 4 zeros. The node is 0.
Repeat while node is at least 0 and item node of visited is 0.
Set item node of visited to 1. Set node to item node of nexts.
If node is at least 0, show true, otherwise show false.
Expected stdout
true