add thinking in lcs
time o(n^2) and space o(2n)