Day 62: Linked-list cycle detection
The task is to detect and repair a singly linked list that contains cycle. And the solution is fast, very simple and brilliant.
Here’s an idea. Iterate through the list using two pointers — slow and fast. Slow pointer iterates node by node…