Maximum length sub - sequence of ( 0. . )
for i in range ( 1 , n ) : NEW_LINE INDENT if arr [ i ] == 0 : NEW_LINE INDENT dp [ 0 ] [ i ] = dp [ 0 ] [ i - 1 ] + 1 NEW_LINE DEDENT else : NEW_LINE INDENT dp [ 0 ] [ i ] = dp [ 0 ] [ i - 1 ] NEW_LINE DEDENT DEDENT