Space complexity of binary tree search kth min el.

Hi,

in the article
https://leetcode.com/articles/kth-smallest-element-in-a-bst/?orderBy=newest_to_oldest

space complexity is O(H+k) but seems it is O(H)

What do you think?

1

Comments (0)