255. Verify Preorder Sequence in Binary Search Tree

Given an array preorder representing the preorder traversal of a BST (without duplicates), determine if it is a valid preorder sequence.

In preorder, we visit: node, then left subtree, then right subtree.

Examples
Input: [1]
Output: true
Hints

255. Verify Preorder Sequence in Binary Search Tree

Given an array `preorder` representing the preorder traversal of a BST (without duplicates), determine if it is a valid preorder sequence.