Given preorder traversal of a BST, check if each non-leaf node has only one child

mediumLast edited: August 2, 2025