Given a non-empty BST and a target, find the value in the BST that is closest to the target.
Given the root of a Binary Search Tree (BST) and a target value, find the value in the BST that is closest to the target. If two values are equally close, return the smaller value.
Examples
Input:[[8,4,12,2,6,10,14],2.25]
Output:2
Input:[[9,5,13,3,7,11,15],3.25]
Output:3
Hints
Use BST property to traverse - go left if target < current, right if target > current.