Create a loop for testing ( 5 is pointing to 3 )
head . next . next . next . next . next = head . next . next NEW_LINE found = detectLoop ( head ) NEW_LINE if ( found ) : NEW_LINE INDENT print ( " Loop ▁ Found " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " No ▁ Loop " ) NEW_LINE DEDENT