You are given the root of a Binary Search Tree (BST).
Your task is to return the minimum absolute difference between the values of any two distinct nodes in the BST.
Because a BST’s inorder traversal gives values in sorted order, the smallest difference will always occur between two consecutive values in that order.
Input: root = [4,2,6,1,3]
Output: 1
Input: root = [1,0,48,null,null,12,49]
Output: 1
Accepted:
Submission: