* L [ i ] = { MaxSum ( L [ j ] ) } + arr [ i ] where j < i and arr [ j ] < arr [ i ]
if ( ( arr [ i ] > arr [ j ] ) && ( findSum ( L [ i ] ) < findSum ( L [ j ] ) ) ) { foreach ( int k in L [ j ] ) if ( ! L [ i ] . Contains ( k ) ) L [ i ] . Add ( k ) ; } }