Finding all possible subarrays
for i in range ( 0 , length ) : NEW_LINE INDENT for j in range ( i , length ) : NEW_LINE INDENT val = digitProduct ( digits , i , j ) NEW_LINE if val in products : NEW_LINE INDENT return False NEW_LINE DEDENT else : NEW_LINE INDENT products . add ( val ) NEW_LINE DEDENT DEDENT DEDENT return True NEW_LINE