Write a Java method to determine if a binary tree is a valid binary search tree (BST).
Anonymous
Assume you have the TreeNode class defined as follows: public class TreeNode { int val; TreeNode left; TreeNode right; TreeNode(int x) { val = x; } }
Check out your Company Bowl for anonymous work chats.