V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
IsaacYoung
V2EX  ›  算法

leetcode 俄罗斯套娃问题

  •  
  •   IsaacYoung · May 26, 2022 · 1371 views
    This topic created in 1443 days ago, the information mentioned may be changed or developed.

    https://leetcode.com/problems/russian-doll-envelopes/

    二维的情况下 通过 x 升序 y 降序排序,降低一个维度后使用 LIS 算法即可

    如果升级到 3 维甚至 N 维呢?

    1 replies    2022-05-26 19:11:28 +08:00
    thedrwu
        1
    thedrwu  
       May 26, 2022 via Android
    粗略看了一眼。按照 max(w,h,z)排列,然后 O(n²)找回去
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   971 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 54ms · UTC 20:05 · PVG 04:05 · LAX 13:05 · JFK 16:05
    ♥ Do have faith in what you're doing.