mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-24 22:38:57 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你一个二叉树的根节点 <code>root</code> , 检查它是否轴对称。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n<img alt=\"\" src=\"https://assets.leetcode.com/uploads/2021/02/19/symtree1.jpg\" style=\"width: 354px; height: 291px;\" />\n<pre>\n<strong>输入:</strong>root = [1,2,2,3,4,4,3]\n<strong>输出:</strong>true\n</pre>\n\n<p><strong>示例 2:</strong></p>\n<img alt=\"\" src=\"https://assets.leetcode.com/uploads/2021/02/19/symtree2.jpg\" style=\"width: 308px; height: 258px;\" />\n<pre>\n<strong>输入:</strong>root = [1,2,2,null,3,null,3]\n<strong>输出:</strong>false\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li>树中节点数目在范围 <code>[1, 1000]</code> 内</li>\n\t<li><code>-100 <= Node.val <= 100</code></li>\n</ul>\n\n<p> </p>\n\n<p><strong>进阶:</strong>你可以运用递归和迭代两种方法解决这个问题吗?</p>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 1835,
|
||||
"likes": 1877,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -61,13 +61,13 @@
|
||||
{
|
||||
"lang": "Python",
|
||||
"langSlug": "python",
|
||||
"code": "# Definition for a binary tree node.\n# class TreeNode(object):\n# def __init__(self, val=0, left=None, right=None):\n# self.val = val\n# self.left = left\n# self.right = right\nclass Solution(object):\n def isSymmetric(self, root):\n \"\"\"\n :type root: TreeNode\n :rtype: bool\n \"\"\"",
|
||||
"code": "# Definition for a binary tree node.\n# class TreeNode(object):\n# def __init__(self, val=0, left=None, right=None):\n# self.val = val\n# self.left = left\n# self.right = right\nclass Solution(object):\n def isSymmetric(self, root):\n \"\"\"\n :type root: TreeNode\n :rtype: bool\n \"\"\"\n ",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
"lang": "Python3",
|
||||
"langSlug": "python3",
|
||||
"code": "# Definition for a binary tree node.\n# class TreeNode:\n# def __init__(self, val=0, left=None, right=None):\n# self.val = val\n# self.left = left\n# self.right = right\nclass Solution:\n def isSymmetric(self, root: TreeNode) -> bool:",
|
||||
"code": "# Definition for a binary tree node.\n# class TreeNode:\n# def __init__(self, val=0, left=None, right=None):\n# self.val = val\n# self.left = left\n# self.right = right\nclass Solution:\n def isSymmetric(self, root: Optional[TreeNode]) -> bool:",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"543.2K\", \"totalSubmission\": \"946.5K\", \"totalAcceptedRaw\": 543184, \"totalSubmissionRaw\": 946539, \"acRate\": \"57.4%\"}",
|
||||
"stats": "{\"totalAccepted\": \"571.1K\", \"totalSubmission\": \"992.7K\", \"totalAcceptedRaw\": 571106, \"totalSubmissionRaw\": 992664, \"acRate\": \"57.5%\"}",
|
||||
"hints": [],
|
||||
"solution": {
|
||||
"id": "89",
|
||||
|
||||
Reference in New Issue
Block a user