leetcode
leetcode copied to clipboard
Fix: Big O in 0235-lowest-common-ancestor-of-a-binary-search-tree.js
- File(s) Modified: 0235-lowest-common-ancestor-of-a-binary-search-tree.js
- Language(s) Used: javascript
Description
The time complexity of the current solution should be O(H), not O(N) when N is the total number of node and H is the height of the tree (in a specific case H will equal to N).