mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 07:21:40 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给定二叉树的根节点 <code>root</code>,找出存在于 <strong>不同</strong> 节点 <code>A</code> 和 <code>B</code> 之间的最大值 <code>V</code>,其中 <code>V = |A.val - B.val|</code>,且 <code>A</code> 是 <code>B</code> 的祖先。</p>\n\n<p>(如果 A 的任何子节点之一为 B,或者 A 的任何子节点是 B 的祖先,那么我们认为 A 是 B 的祖先)</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<p><img alt=\"\" src=\"https://assets.leetcode.com/uploads/2020/11/09/tmp-tree.jpg\" style=\"width: 400px; height: 390px;\" /></p>\n\n<pre>\n<strong>输入:</strong>root = [8,3,10,1,6,null,14,null,null,4,7,13]\n<strong>输出:</strong>7\n<strong>解释: </strong>\n我们有大量的节点与其祖先的差值,其中一些如下:\n|8 - 3| = 5\n|3 - 7| = 4\n|8 - 1| = 7\n|10 - 13| = 3\n在所有可能的差值中,最大值 7 由 |8 - 1| = 7 得出。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n<img alt=\"\" src=\"https://assets.leetcode.com/uploads/2020/11/09/tmp-tree-1.jpg\" style=\"width: 250px; height: 349px;\" />\n<pre>\n<strong>输入:</strong>root = [1,null,2,null,0,3]\n<strong>输出:</strong>3\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li>树中的节点数在 <code>2</code> 到 <code>5000</code> 之间。</li>\n\t<li><code>0 <= Node.val <= 10<sup>5</sup></code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 113,
|
||||
"likes": 114,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -149,7 +149,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"11.6K\", \"totalSubmission\": \"17.1K\", \"totalAcceptedRaw\": 11611, \"totalSubmissionRaw\": 17081, \"acRate\": \"68.0%\"}",
|
||||
"stats": "{\"totalAccepted\": \"11.8K\", \"totalSubmission\": \"17.4K\", \"totalAcceptedRaw\": 11846, \"totalSubmissionRaw\": 17382, \"acRate\": \"68.2%\"}",
|
||||
"hints": [
|
||||
"For each subtree, find the minimum value and maximum value of its descendants."
|
||||
],
|
||||
|
Reference in New Issue
Block a user