Solution: Kth Smallest Element in a BST
Let's solve the Kth Smallest Element in a BST problem using the Tree Depth-First Search pattern.
We'll cover the following...
We'll cover the following...
Statement
Given the root node of a binary search tree and an integer value k
, return the smallest value in the tree.
Constraints:
- The number of nodes in the tree is .