xamples
epeat
ode
pproach
ptimize
est
Given the head of a singly linked list, determine if there is a cycle. If there is, return the length of the cycle, and the first node in the cycle.
Easy, right?
Here's the catch:
What would the linked list above return?
Answer
Length: 6
Start Node: 3
The Runner Technique
Finding the cycle solution
Determining Cycle Length
Determining Cycle Length
Finding the start of the cycle
Solution : https://repl.it/BlUo/
Key Takeaways: