Given the root of a binary search tree and an inclusive range [lo, hi], return all keys within that range in ascending (sorted) order as an array. Use the BST property to prune. The input gives a level-order BST array and 'lo hi' separated by ' | '.
Input: A level-order BST array and 'lo hi', separated by ' | '.
Output: Array — the in-range keys, sorted ascending.
Input: [8,3,10,1,6,null,14] | 4 10
Output: [6,8,10]
Explanation: Keys within [4,10] in order.Input: [5] | 1 10
Output: [5]
Explanation: Single key in range.Input: [5] | 6 10
Output: []
Explanation: No keys in range.0<=nodes<=10^4valid BSTlo<=hi