Given the root of a binary search tree and a target value, return the floor of the target — the largest key less than or equal to the target. Return -1 if no such key exists. The input gives a level-order BST array and the target separated by ' | '.
Input: A level-order BST array and the target, separated by ' | '.
Output: Integer — the floor value, or -1.
Input: [8,3,10,1,6,null,14] | 5
Output: 3
Explanation: Largest key <= 5.Input: [8,3,10,1,6,null,14] | 6
Output: 6
Explanation: Exact match is its own floor.Input: [8,3,10,1,6,null,14] | 0
Output: -1
Explanation: No key <= 0.0<=nodes<=10^4valid BST