Valid BST + Next Permutation