/* compute a longest strictly increasing subsequence of an array of ints */ /* input is array a with given length n */ /* returns length of LIS */ /* If the output pointer is non-null, writes LIS to output pointer. */ /* Caller should provide at least sizeof(int)*n space for output */ /* If there are multiple LIS's, which one is returned is arbitrary. */ unsigned long longest_increasing_subsequence(const int a[], unsigned long n, int *output);