Detect and Remove Cycle in Linked List

Given a linked list, detect if a cycle exists. If yes, remove the cycle and return the head of the list.

Difficulty:

Console