update longest increasing sequence