Editorial
Need a hint? Checkout the editorial.
View Editorial
Editorial
Let the total possible arrangement for $n$ numbers be $f(n)$. Show that $f(n)=\sum_{i=0}^{n-1}f(i).f(n-1-i)$
$f(0)=1 \\ f(1)=1 \\ f(2)=2$
You can calculate $f(9)$ from here.
For the general case of calculating $f(n)$,
$f(n)=$ the coefficient of $x^{n-1}$ of ${f(0)+f(1)x+f(2)x^2 + \cdot}^2$
Multiply the equation on the right and $x $ $f(n)$ becomes the coefficient of $x^n$.
Therefore,
$ x{f(0) + f(1)x+f(2)x^2+ \cdots}^2 = f(1)x+f(2)x^2+ \cdots $
Let $f(0)+f(1x)+ \cdots = P(x) $.
$ xP(x)^2=P(x)-1$
$\implies P(x)= \frac{1 \pm \sqrt{1-4x}}{2x}$
Determine the Maclaurin series of $\sqrt{1-4x} $ and put it in the equation.