俄罗斯套娃问题
var maxEnvelopes = function(envelopes) {
let len = envelopes.length
envelopes.sort(function(a,b) {
return a[0] == b[0] ? b[1]- a[1] : a[0]-b[0]
})
let height = []
for(let i = 0 ;i < len; i++) {
height[i] = envelopes[i][1]
}
return lengthOfLIS(height)
};
调用查找最长子序列方法:https://www.jianshu.com/p/a1019fbd7e56