V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
urnoob
V2EX  ›  程序员

误入软件行业的老年人第一次独立做出了某算法网站 hard 题

  •  
  •   urnoob · Jul 26, 2022 · 1777 views
    This topic created in 1383 days ago, the information mentioned may be changed or developed.
    第 124 题
    本来用
    PriorityQueue<Integer> q = new PriorityQueue<>(1, (o1, o2) -> o2 - o1)
    保存最大值
    就只超过了 5%的提交 6 ms 48.6 MB

    后来直接用 1 个元素的数组保存
    Runtime: 1 ms, faster than 99.67% of Java online submissions for Binary Tree Maximum Path Sum.
    Memory Usage: 48 MB, less than 38.84% of Java online submissions for Binary Tree Maximum Path Sum.
    1 replies    2022-07-26 21:37:07 +08:00
    codefever
        1
    codefever  
       Jul 26, 2022
    再接再厉!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3451 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 52ms · UTC 10:42 · PVG 18:42 · LAX 03:42 · JFK 06:42
    ♥ Do have faith in what you're doing.