Validate Binary Search Tree

 

98. Validate Binary Search Tree

Solutions

Solution 1:

  1. Keep lower bound and upper bound for each node
  2. Recursively check if a node is within the range Solution 2: Inorder Traversal