update arr [ i ] subsequence length in ' inc ' and in len_inc [ ]
len_inc [ i ] = len + 1 ; if ( inc . ContainsKey ( arr [ i ] ) ) { inc . Remove ( arr [ i ] ) ; inc . Add ( arr [ i ] , len_inc [ i ] ) ; } else inc . Add ( arr [ i ] , len_inc [ i ] ) ; }