All challenges

Algorithm challenge · DSA

Linked List Cycle Check

Difficulty

medium

Time

~20m

Format

Single

Grading

Auto-graded

#python#javascript#typescript#go#java#cpp#rust#dsa#linked-list#two-pointers
Mission file // read carefullymedium

Given the head of a linked list (modeled as an array list representing node target connections, where -1 means no cycle, other values represent index cycles), return true if it contains a cycle.

Build with

hasCycle(nodes: int[]) → bool
PythonJavaScriptTypeScriptGoJavaC++Rust
2 tests
Auto-graded on submit
Start challenge

Sign in to save your progress.