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>给定一个二叉树,编写一个函数来获取这个树的最大宽度。树的宽度是所有层中的最大宽度。这个二叉树与<strong>满二叉树(full binary tree)</strong>结构相同,但一些节点为空。</p>\n\n<p>每一层的宽度被定义为两个端点(该层最左和最右的非空节点,两端点间的<code>null</code>节点也计入长度)之间的长度。</p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong> \n\n 1\n / \\\n 3 2\n / \\ \\ \n 5 3 9 \n\n<strong>输出:</strong> 4\n<strong>解释:</strong> 最大值出现在树的第 3 层,宽度为 4 (5,3,null,9)。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong> \n\n 1\n / \n 3 \n / \\ \n 5 3 \n\n<strong>输出:</strong> 2\n<strong>解释:</strong> 最大值出现在树的第 3 层,宽度为 2 (5,3)。\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre>\n<strong>输入:</strong> \n\n 1\n / \\\n 3 2 \n / \n 5 \n\n<strong>输出:</strong> 2\n<strong>解释:</strong> 最大值出现在树的第 2 层,宽度为 2 (3,2)。\n</pre>\n\n<p><strong>示例 4:</strong></p>\n\n<pre>\n<strong>输入:</strong> \n\n 1\n / \\\n 3 2\n / \\ \n 5 9 \n / \\\n 6 7\n<strong>输出:</strong> 8\n<strong>解释:</strong> 最大值出现在树的第 4 层,宽度为 8 (6,null,null,null,null,null,null,7)。\n</pre>\n\n<p><strong>注意:</strong> 答案在32位有符号整数的表示范围内。</p>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 320,
|
||||
"likes": 321,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"38.8K\", \"totalSubmission\": \"94.9K\", \"totalAcceptedRaw\": 38762, \"totalSubmissionRaw\": 94924, \"acRate\": \"40.8%\"}",
|
||||
"stats": "{\"totalAccepted\": \"39K\", \"totalSubmission\": \"95.4K\", \"totalAcceptedRaw\": 38957, \"totalSubmissionRaw\": 95388, \"acRate\": \"40.8%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
Reference in New Issue
Block a user