Skip to content

Latest commit

 

History

History

p354_russian_doll_envelopes

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

p354_russian_doll_envelopes

Make first dimension be ascending, and second dimension be descending, then the quesion is same as 300. Longest Increasing Subsequence.

The purpose of making second dimension be descending is to make sure not to choose two envelopes that have the same first dimension.


使第一维升序,第二维降序,则问题与300. 最长递增子序列相同。

使第二维降序的目的是确保不要选择具有相同第一维的两个信封。