• 请不要在回答技术问题时复制粘贴 AI 生成的内容
urnoob
V2EX  ›  程序员

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

  •  
  •   urnoob · Jul 26, 2022 · 1849 views
    This topic created in 1403 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   ·   2824 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 09:16 · PVG 17:16 · LAX 02:16 · JFK 05:16
    ♥ Do have faith in what you're doing.