Longest increasing subsequence.c