From c863a8a23dbba89da4c1e9485879c198958d1365 Mon Sep 17 00:00:00 2001 From: CyC2018 Date: Wed, 28 Oct 2026 13:45:04 +0800 Subject: [PATCH] =?UTF-8?q?Update=2027.=20=E4=BA=8C=E5=8F=89=E6=A0=91?= =?UTF-8?q?=E7=9A=84=E9=95=9C=E5=83=8F.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 题目链接改为力扣中的对应题目,题目描述和代码按该题的接口调整。 --- notes/27. 二叉树的镜像.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/notes/27. 二叉树的镜像.md b/notes/27. 二叉树的镜像.md index 18b5f0fa..7f803db4 100644 --- a/notes/27. 二叉树的镜像.md +++ b/notes/27. 二叉树的镜像.md @@ -1,6 +1,6 @@ # 27. 二叉树的镜像 -[牛客网](https://www.nowcoder.com/practice/a9d0ecbacef9410ca97463e4a5c83be7?tpId=13&tqId=11171&tab=answerKey&from=cyc_github) +[Leetcode](https://leetcode.cn/problems/er-cha-shu-de-jing-xiang-lcof/) ## 题目描述 @@ -9,12 +9,12 @@ ## 解题思路 ```java -public TreeNode Mirror(TreeNode root) { +public TreeNode flipTree(TreeNode root) { if (root == null) return root; swap(root); - Mirror(root.left); - Mirror(root.right); + flipTree(root.left); + flipTree(root.right); return root; }