AMD Interview Question

detect and remove a loop from a linked list