Glossary: Coding Interviews in Go
Cycle
A linked list whose last node links back to an earlier one, so a plain walk never ends. Fast and slow pointers detect it when they meet on the same node.
Glossary: Coding Interviews in Go
A linked list whose last node links back to an earlier one, so a plain walk never ends. Fast and slow pointers detect it when they meet on the same node.