Find longest increasing sequence
A simpler problem is to find the length of the longest increasing subsequence. You can focus on understanding that problem first. The only difference in the algorithm is that it doesn’t use the P array. x is the input of a sequence, so it can be initialized as: x = [0, 8, 4, 12, 2, … Read more