L [ i ] = { Max ( L [ j ] ) } + arr [ i ] where j < i and arr [ j ] < arr [ i ]
if arr [ i ] > arr [ j ] and ( len ( l [ i ] ) < len ( l [ j ] ) + 1 ) : NEW_LINE INDENT l [ i ] = l [ j ] . copy ( ) NEW_LINE DEDENT