Given the root of a non-empty binary search tree, return the minimum key — the value found by following left children to the end. Return -1 for an empty tree. The tree is given as a level-order BST array.
Input: A level-order BST array.
Output: Integer — the minimum key (or -1 if empty).
Input: [8,3,10,1,6,null,14]
Output: 1
Explanation: Leftmost node holds the minimum.Input: [5]
Output: 5
Explanation: Single node.Input: [2,1,3]
Output: 1
Explanation: Leftmost is 1.0<=nodes<=10^4valid BST