From f023ec4d768e5f8b87a5d8a30058a91d8d981dec Mon Sep 17 00:00:00 2001 From: CyC2018 Date: Wed, 28 Oct 2026 13:45:05 +0800 Subject: [PATCH] =?UTF-8?q?Update=2033.=20=E4=BA=8C=E5=8F=89=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=A0=91=E7=9A=84=E5=90=8E=E5=BA=8F=E9=81=8D=E5=8E=86?= =?UTF-8?q?=E5=BA=8F=E5=88=97.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 题目链接改为力扣中的对应题目,题目描述和代码按该题的接口调整。 --- notes/33. 二叉搜索树的后序遍历序列.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/notes/33. 二叉搜索树的后序遍历序列.md b/notes/33. 二叉搜索树的后序遍历序列.md index 167f22a1..45ce3cd6 100644 --- a/notes/33. 二叉搜索树的后序遍历序列.md +++ b/notes/33. 二叉搜索树的后序遍历序列.md @@ -1,6 +1,6 @@ # 33. 二叉搜索树的后序遍历序列 -[NowCoder](https://www.nowcoder.com/practice/a861533d45854474ac791d90e447bafd?tpId=13&tqId=11176&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) +[Leetcode](https://leetcode.cn/problems/er-cha-sou-suo-shu-de-hou-xu-bian-li-xu-lie-lcof/) ## 题目描述 @@ -13,10 +13,10 @@ ## 解题思路 ```java -public boolean VerifySquenceOfBST(int[] sequence) { - if (sequence == null || sequence.length == 0) - return false; - return verify(sequence, 0, sequence.length - 1); +public boolean verifyTreeOrder(int[] postorder) { + if (postorder == null || postorder.length == 0) + return true; + return verify(postorder, 0, postorder.length - 1); } private boolean verify(int[] sequence, int first, int last) {