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

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