[ Python ] ✅✅ Simple Python Solution Using Recursion 🥳✌👍
If You like the Solution, Don\'t Forget To UpVote Me, Please UpVote! \uD83D\uDD3C\uD83D\uDE4F\n# Runtime: 41 ms, faster than 29.46% of Python3 online submission
# If You like the Solution, Don\'t Forget To UpVote Me, Please UpVote! \uD83D\uDD3C\uD83D\uDE4F\n# Runtime: 41 ms, faster than 29.46% of Python3 online submissions for Symmetric Tree.\n# Memory Usage: 13.8 MB, less than 99.68% of Python3 online submissions for Symmetric Tree.\n\tclass Solution:\n\t\tdef isSymmetric(self, root: Optional[TreeNode]) -> bool:\n\n\t\t\tdef check_mirror_image(root1, root2):\n\n\t\t\t\tif root1 == None and root2 == None:\n\t\t\t\t\treturn True\n\n\t\t\t\tif root1 != None and root2 == None or root1 == None and root2 != None:\n\t\t\t\t\treturn False\n\n\t\t\t\tif root1.val == root2.val:\n\t\t\t\t\treturn check_mirror_image(root1.left, root2.right) and check_mirror_image(root1.right, root2.left)\n\n\t\t\treturn check_mirror_image(root, root)\n\t\t\t\n# Thank You So Much \uD83E\uDD73\u270C\uD83D\uDC4D\n
['Recursion', 'Python', 'Python3']