Gainsight Interview Question

longest subsequence sum