* 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 ] ) ) ) { for ( let k = 0 ; k < L [ j ] . length ; k ++ ) if ( ! L [ i ] . includes ( L [ j ] [ k ] ) ) L [ i ] . push ( L [ j ] [ k ] ) ; } }