IsaacYoung
V2EX  ›  算法

leetcode 俄罗斯套娃问题

  •  
  •   IsaacYoung · May 26, 2022 · 1794 views
    This topic created in 1624 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
    thedrwu
    May 26, 2022 via Android
    1
    粗略看了一眼。按照 max(w,h,z)排列,然后 O(n²)找回去
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1642 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 23:58 · PVG 07:58 · LAX 15:58 · JFK 18:58
    ♥ Do have faith in what you're doing.