Find the k-th smallest element in a binary search tree. Perform an in-order traversal to generate the sorted sequence, store it in an array, and return the k-th element.
| |
Find the k-th smallest element in a binary search tree. Perform an in-order traversal to generate the sorted sequence, store it in an array, and return the k-th element.
| |