Capgemini interview question

Remove Loop from a Linked List