GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing leetcode.cn — LCR 053. 二叉搜索树中的中序后继 - 力扣(LeetCode) 题目描述 题目描述 题解 题解 提交记录 提交记录 中等 给定一棵二叉搜索树和其中的一个节点 节点
示例 1: 输入:root = [2,1,3], p = 1 输出:2 解释:这里 1 的中序后继是 2。请注意 p 和返回值都应是 TreeNode 类型。 示例 2: 输入:root = [5,3,6,2,4,null,null,1], p = 6
输出:null
解释:因为给出的节点没有中序后继,所以答案就返回
提示:
注意:本题与主站 285 题相同: https://leetcode.cn/problems/inorder-successor-in-bst/ 代码 代码 测试用例 测试用例 测试结果 测试结果 |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |