Skip to content
intermediate

Challenge: the tortoise and the hare

Implement this from the stub. Hidden tests grade the behaviour you write, not the comments you leave.

Challenge: The Tortoise and the Hare

interface ListNode {
  value: number
  next?: ListNode
}

export function hasCycle(head: ListNode | undefined): boolean {
  // Your implementation here
}
challenge — implement from scratchCtrl+↵ submits · Ctrl+Shift+↵ runsstarter code