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