Validate Binary Search Tree

Given a binary tree, determine if it is a valid binary search tree (BST).

recursive version:

iterative version:

Comments

Popular posts from this blog

Maximum Gap

House Robber