Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Validate Binary Search Tree (Medium 98)

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

Solution:

Click here Recursively pass minimum, maximum down to nodes and check if both left child and right child satisfy those constraints, update min and max when needed. O(n) time, O(n) space.



Installation

Run make to run python and Swift files.