Given a circular linked list, implement an algorithm that returns the node at the beginning of the loop.
DEFINITION
Circular linked list: A (corrupt) linked list in which a node's next pointer points to an earlier node, so as to make a loop in the linked list.
EXAMPLE
Input: a-b-c-d-e-c
Output: c
O(n)
O(n)
Run make to build and run C++ files and run Swift files. Or you can run .playground file.