Cycle Detection and Removal

Why is it failing a few test cases ?

image
here it should be fast->next=NULL