Problem 230: Kth Smallest Element in a BST
https://leetcode.com/problems/kth-smallest-element-in-a-bst/
思路
利用 iterative 的方法遍历整个 tree,到了第 k 个的时候就停下
复杂度
Time:
O(n)
Space:
O(n)
PreviousProblem 98: Validate Binary Search TreeNextProblem: Convert Binary Search Tree to Doubly Linked List (LintCode)
Last updated