Number of Ways to Reorder Array to Get Same BST
The first value fixes the root, and the two sides interleave freely, so the count is a product of binomial coefficients.
The first value fixes the root, and the two sides interleave freely, so the count is a product of binomial coefficients.