Skip to main content
Linked List Cycle | AlgoCracked
AlgoCracked
ProblemsLinked List Cycle
Easy50.0% acceptance
Blind75Linked ListTwo PointersHash Table

Linked List Cycle

Given the head of a linked list, return true if it contains a cycle. Input format Input is [[values, pos]] : the node values and pos , the index the tail's next connects back to ( -1 for no cycle). The harness builds the (possibly cyclic) list and passes you its head ListNode . e.g. [[[3,2,0,-4],1]] links the tail back to index 1.

Loading workspace…