V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
IsaacYoung
V2EX  ›  算法

leetcode 俄罗斯套娃问题

  •  
  •   IsaacYoung · 2022-05-26 18:30:25 +08:00 · 837 次点击
    这是一个创建于 694 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

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

    1 条回复    2022-05-26 19:11:28 +08:00
    thedrwu
        1
    thedrwu  
       2022-05-26 19:11:28 +08:00 via Android
    粗略看了一眼。按照 max(w,h,z)排列,然后 O(n²)找回去
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2879 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 07:30 · PVG 15:30 · LAX 00:30 · JFK 03:30
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.