Publicis Sapient interview question

Check for loop in a linked list