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) {