minDiffInBST = function(root) {
    // levelOrderTraversal
    const sortedArr = dfs(root, []);
    
    let min = Infinity;
    for (let i = 1; i < sortedArr.length; i++) {
        min = Math.min(min, sortedArr[i] - sortedArr[i - 1]);
    }
    return min;
}
DFS (level order traversal)
Time O(n) | Space O(n)
https://leetcode.com/problems/minimum-distance-between-bst-nodes/
@param {TreeNode} root
@return {number}