题目
https://leetcode.com/problems/increasing-triplet-subsequence/
题解
看到这题,首先,没有思路…
然后,看了下面的 Related Questions,找到了之前看答案写的 300. Longest Increasing Subsequence [题解],用这个思路,写了一个 dp,O(n^2) 的时间复杂度,结果超时了。
原来的办法不可行,所以还是没有思路,于是看了答案。