Create a loop for testing ( 5 is pointing to 3 )
head -> next -> next -> next -> next -> next = head -> next -> next ; bool found = detectLoop ( head ) ; if ( found ) cout << " Loop ▁ Found " ; else cout << " No ▁ Loop ▁ Found " ; return 0 ; }