mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-21 13:06:47 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p><strong>路径</strong> 被定义为一条从树中任意节点出发,沿父节点-子节点连接,达到任意节点的序列。同一个节点在一条路径序列中 <strong>至多出现一次</strong> 。该路径<strong> 至少包含一个 </strong>节点,且不一定经过根节点。</p>\n\n<p><strong>路径和</strong> 是路径中各节点值的总和。</p>\n\n<p>给你一个二叉树的根节点 <code>root</code> ,返回其 <strong>最大路径和</strong> 。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n<img alt=\"\" src=\"https://assets.leetcode.com/uploads/2020/10/13/exx1.jpg\" style=\"width: 322px; height: 182px;\" />\n<pre>\n<strong>输入:</strong>root = [1,2,3]\n<strong>输出:</strong>6\n<strong>解释:</strong>最优路径是 2 -> 1 -> 3 ,路径和为 2 + 1 + 3 = 6</pre>\n\n<p><strong>示例 2:</strong></p>\n<img alt=\"\" src=\"https://assets.leetcode.com/uploads/2020/10/13/exx2.jpg\" />\n<pre>\n<strong>输入:</strong>root = [-10,9,20,null,null,15,7]\n<strong>输出:</strong>42\n<strong>解释:</strong>最优路径是 15 -> 20 -> 7 ,路径和为 15 + 20 + 7 = 42\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li>树中节点数目范围是 <code>[1, 3 * 10<sup>4</sup>]</code></li>\n\t<li><code>-1000 <= Node.val <= 1000</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Hard",
|
||||
"likes": 1501,
|
||||
"likes": 1547,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Path Sum\", \"titleSlug\": \"path-sum\", \"difficulty\": \"Easy\", \"translatedTitle\": \"\\u8def\\u5f84\\u603b\\u548c\"}, {\"title\": \"Sum Root to Leaf Numbers\", \"titleSlug\": \"sum-root-to-leaf-numbers\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u6c42\\u6839\\u8282\\u70b9\\u5230\\u53f6\\u8282\\u70b9\\u6570\\u5b57\\u4e4b\\u548c\"}, {\"title\": \"Path Sum IV\", \"titleSlug\": \"path-sum-iv\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u8def\\u5f84\\u603b\\u548c IV\"}, {\"title\": \"Longest Univalue Path\", \"titleSlug\": \"longest-univalue-path\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u6700\\u957f\\u540c\\u503c\\u8def\\u5f84\"}]",
|
||||
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"211.1K\", \"totalSubmission\": \"470.6K\", \"totalAcceptedRaw\": 211120, \"totalSubmissionRaw\": 470610, \"acRate\": \"44.9%\"}",
|
||||
"stats": "{\"totalAccepted\": \"222.9K\", \"totalSubmission\": \"495.8K\", \"totalAcceptedRaw\": 222863, \"totalSubmissionRaw\": 495755, \"acRate\": \"45.0%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
Reference in New Issue
Block a user