Linked List Cycle
Easy
Linked List
Given a linked list, determine whether it contains a cycle. The input gives pos, the index of the node the tail's next pointer connects to (-1 means no cycle).
Constraints
0 <= n <= 10^4 -10^5 <= value <= 10^5 -1 <= pos < n
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.