Validate Binary Search Tree Overview
The "Validate Binary Search Tree" problem (LeetCode 98) asks you to check if a given binary tree is a valid BST using DFS traversal. It matches LinkedIn interview contexts with tags Tree, DFS, BST, and Binary Tree, focusing on recursive validation.[1][9]
Given the root of a binary tree, determine if it is a valid binary search tree (BST).
A valid BST is defined as follows:
Input: root =[2][3][1]
2 / \ 1 3
Output: true
Input: root = [5,1,4,null,null,3,6]
5 / \ 1 4 / \ 3 6
Output: false
Input: root =[5]
5
Output: true
Input: root = []
Output: true
Input: root = [5,1,5,null,null,3,6] (duplicate 5)
Output: false (strictly less/greater required).[1]
Note: Node values can be duplicates, but valid BST requires strict inequality (< and >, not <= or >=).[3][1]