文章 2017-12-10 来自:开发者社区

[LeetCode] Delete Node in a BST 删除二叉搜索树中的节点

Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of the BST. Basically, the deletion can be divided int....

文章 2017-12-02 来自:开发者社区

[LeetCode] Kth Smallest Element in a BST 二叉搜索树中的第K小的元素

Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note:  You may assume k is always valid, 1 ≤ k ≤ BST's total elements. Follow up: W...

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

算法编程

开发者社区在线编程频道官方技术圈。包含算法资源更新,周赛动态,每日一题互动。

+关注