mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-07 00:11:41 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给定一个二叉树 <strong>根节点</strong> <code>root</code> ,树的每个节点的值要么是 <code>0</code>,要么是 <code>1</code>。请剪除该二叉树中所有节点的值为 <code>0</code> 的子树。</p>\n\n<p>节点 <code>node</code> 的子树为 <code>node</code> 本身,以及所有 <code>node</code> 的后代。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong> [1,null,0,0,1]\n<strong>输出: </strong>[1,null,0,null,1] \n<strong>解释:</strong> \n只有红色节点满足条件“所有不包含 1 的子树”。\n右图为返回的答案。\n\n<img alt=\"\" src=\"https://s3-lc-upload.s3.amazonaws.com/uploads/2018/04/06/1028_2.png\" style=\"width:450px\" />\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong> [1,0,1,0,0,0,1]\n<strong>输出: </strong>[1,null,1,null,1]\n<strong>解释:</strong> \n\n<img alt=\"\" src=\"https://s3-lc-upload.s3.amazonaws.com/uploads/2018/04/06/1028_1.png\" style=\"width:450px\" />\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre>\n<strong>输入:</strong> [1,1,0,1,1,0,1,0]\n<strong>输出: </strong>[1,1,0,1,1,null,1]\n<strong>解释:</strong> \n\n<img alt=\"\" src=\"https://s3-lc-upload.s3.amazonaws.com/uploads/2018/04/05/1028.png\" style=\"width:450px\" />\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li>二叉树的节点个数的范围是 <code>[1,200]</code></li>\n\t<li>二叉树节点的值只会是 <code>0</code> 或 <code>1</code></li>\n</ul>\n\n<p> </p>\n\n<p><meta charset=\"UTF-8\" />注意:本题与主站 814 题相同:<a href=\"https://leetcode-cn.com/problems/binary-tree-pruning/\">https://leetcode-cn.com/problems/binary-tree-pruning/</a></p>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 27,
|
||||
"likes": 32,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -156,7 +156,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"10.5K\", \"totalSubmission\": \"15.2K\", \"totalAcceptedRaw\": 10481, \"totalSubmissionRaw\": 15204, \"acRate\": \"68.9%\"}",
|
||||
"stats": "{\"totalAccepted\": \"12.5K\", \"totalSubmission\": \"18.2K\", \"totalAcceptedRaw\": 12521, \"totalSubmissionRaw\": 18239, \"acRate\": \"68.6%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
Reference in New Issue
Block a user