Given the `root` of a binary tree, _determine if it is a valid binary search tree (BST)_.

A **valid BST** is defined as follows:

*   The left subtree of a node contains only nodes with keys **less than** the node's key.
*   The right subtree of a node contains only nodes with keys **greater than** the node's key.
*   Both the left and right subtrees must also be binary search trees.

**Example 1:**

**Input:** root = \[2,1,3\]
**Output:** true

**Example 2:**

**Input:** root = \[5,1,4,null,null,3,6\]
**Output:** false
**Explanation:** The root node's value is 5 but its right child's value is 4.

**Constraints:**

*   The number of nodes in the tree is in the range `[1, 104]`.
*   `-231 <= Node.val <= 231 - 1`
```python
class TreeNode:
    def __init__(self, val=0, left=None, right=None):
        self.val = val
        self.left = left
        self.right = right

def isValidBSTHelper(node, min_val, max_val):
    if node is None:
        return True
    if not min_val < node.val < max_val:
        return False
    return (isValidBSTHelper(node.left, min_val, node.val) and
            isValidBSTHelper(node.right, node.val, max_val))

def isValidBST(root):
    return isValidBSTHelper(root, float('-inf'), float('inf'))
```
explanation
The algorithm follows a simple recursive approach to determine if a given binary tree is a valid Binary Search Tree (BST). The key idea is to maintain a range for each node, which is defined by the minimum and maximum values that the node's value should be within. For example, the root node's value should be in the range of (-Infinity, Infinity). When traversing to the left child, the maximum value for the range should be updated to the parent's value, and for traversing to the right child, the minimum value for the range should be updated to the parent's value. The algorithm continues recursively in this manner.

A helper function, `isValidBSTHelper`, is defined and initialized with the root and the range (-Infinity, Infinity). If the node is `null`, it means that we have reached a leaf node and it should return `true`. If the value of the node is not within the specified range, it means that the node does not meet the BST requirement and the helper function should return `false`. If the node is valid, then the helper function proceeds to check for valid BSTs in its left and right subtrees with the updated range.