1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 07:21:40 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-05-02 23:44:12 +08:00
parent 7ea03594b3
commit 2a71c78585
4790 changed files with 11696 additions and 10944 deletions

View File

@@ -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>示例&nbsp;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": 321,
"likes": 338,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -155,7 +155,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"39K\", \"totalSubmission\": \"95.4K\", \"totalAcceptedRaw\": 38957, \"totalSubmissionRaw\": 95388, \"acRate\": \"40.8%\"}",
"stats": "{\"totalAccepted\": \"41.8K\", \"totalSubmission\": \"102.3K\", \"totalAcceptedRaw\": 41832, \"totalSubmissionRaw\": 102264, \"acRate\": \"40.9%\"}",
"hints": [],
"solution": null,
"status": null,