Simple Recursive solution to check whether BST contains dead end
Given a Binary search Tree that contains positive integer values greater than 0. The task is to check whether the BST contains a dead end or not. Here Dead End means, we are not able to insert any element after that node.Examples:Â Â Input: root[] = [8, 5, 9, 2, 7, N, N, 1]Output: trueExplanation: Nod