If current elements divides arr [ i ] and length is greater than the previous index , then insert the current element to the sequences LDS [ i ]
if ( ( arr [ i ] % arr [ j ] == 0 ) and ( len ( LDS [ i ] ) < len ( LDS [ j ] ) + 1 ) ) : NEW_LINE INDENT LDS [ i ] = LDS [ j ] . copy ( ) NEW_LINE DEDENT