Validate Binary Search Tree

IF
AlgoAxiomStaff Engineers
JSTS
Medium20 mins

Given the root of a binary tree, determine if it is a valid binary search tree where left subtree values are less than the node and right subtree values are greater.

Source: Tree Depth-First Search pattern — AlgoAxiom
JavaScript
Test Case 1
root = [1, 2, 3]
Test Case 2
root = [1, 2, 3, 4, 5]
Idle