add longest increasing subsequence algorithm