Update 33. 二叉搜索树的后序遍历序列.md

题目链接改为力扣中的对应题目,题目描述和代码按该题的接口调整。
This commit is contained in:
CyC2018
2026-10-28 13:45:05 +08:00
parent b2e683e8f9
commit f023ec4d76
@@ -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) {