4. Move the head to point to new Node
head = new_node ; } Boolean detectLoop ( ) { Node slow_p = head , fast_p = head ; while ( slow_p != null && fast_p != null && fast_p . next != null ) { slow_p = slow_p . next ; fast_p = fast_p . next . next ; if ( slow_p == fast_p ) { return true ; } } return false ; }