Given the root of a binary search tree built from distinct positive integers, determine whether it contains a dead end — a leaf node into which no new value could ever be inserted because the allowed range below it is empty. Return true or false. The input is a level-order BST array.
Input: A level-order BST array (positive keys).
Output: Boolean — true or false.
Input: [8,5,9,2,7,null,null,1]
Output: true
Explanation: Leaf 1 cannot accept any insertion.Input: [8,5,9,7,11,null,null,2]
Output: false
Explanation: No dead-end leaf.Input: [5]
Output: false
Explanation: Root leaf can still accept values.1<=nodes<=10^4valid BSTpositive distinct keys