leetcode

98. Validate Binary Search Tree

Solution code

Time complexity: O(n)

h = height of tree

Space complexity: O(h)