![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
binary search tree
Haskei
这个作者很懒,什么都没留下…
展开
-
[Leetcode] 510. Inorder Successor in BST II (中序遍历后继节点)
510.Inorder Successor in BST II (题目链接) Medium Given anodein a binary search tree, findthe in-order successor of that node in the BST. If that node has no in-order successor, returnnull. The successor of anodeis the node with the smallest key gre...原创 2020-08-06 14:33:33 · 232 阅读 · 0 评论 -
[Leetcode] 285. Inorder Successor in BST (搜索二叉树中序后继节点)
285.Inorder Successor in BST (题目链接) Medium Given a binary search tree and a node in it, find the in-order successor of that node in the BST. The successor of a nodepis the node with the smallest key greater thanp.val. Example 1: Input: root ...原创 2020-08-06 13:15:57 · 197 阅读 · 0 评论 -
[Leetcode] 173. Binary Search Tree Iterator (栈)
173.Binary Search Tree Iterator (题目链接) Medium Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Callingnext()will return the next smallest number in the BST. Example: BSTIter...原创 2020-08-06 11:09:59 · 114 阅读 · 0 评论 -
[Leetcode] 109. Convert Sorted List to Binary Search Tree (二分)
109.Convert Sorted List to Binary Search Tree Medium Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tree is defined as a binary tree in which the .原创 2020-08-06 09:56:26 · 120 阅读 · 0 评论 -
[Leetcode] 426. Convert Binary Search Tree to Sorted Doubly Linked List
426.Convert Binary Search Tree to Sorted Doubly Linked List (题目链接) Medium Convert aBinary Search Treeto a sortedCircular Doubly-Linked Listin place. You can think of the left and right pointers as synonymous to the predecessor and successor pointer...原创 2020-08-06 07:14:25 · 124 阅读 · 0 评论