calculate the Cantalan numer or why is Cantalan number?

It is a math theory, you can find the similar proof stack pop sequence.

A equivalent problem the stack pop sequence.for exam, 1 2 3 4,the stack pop sequence may be 3 4 2 1, but 4 2 3 1 is wrong. each pop sequence is compared to mid-order transverse , while the origin sequence like 1 2 3 4 compared to pre-order transverse. And as you see, we can build the unique BST with the pre-order and mid-order.