354. Russian Doll Envelopes
Hard
Input: envelopes = [[5,4],[6,4],[6,7],[2,3]]
Output: 3
Explanation: The maximum number of envelopes you can Russian doll is 3 ([2,3] => [5,4] => [6,7]).Input: envelopes = [[1,1],[1,1],[1,1]]
Output: 1Solution : Using Same Solution as PB 300 : Longest Increasing Subsequence (Patience Sorting Algorithm) O(nlogn)
Last updated