
KMP: pattern matching your potential...

KMP: pattern matching your potential...
Walk through your approach like an interview
Given a linked list that contains a cycle, determine the length of the cycle. Return 0 if no cycle exists.
head = [3, 2, 0, -4] with tail connected to index 13