Number of unique binary search trees for the given integer n is indeed the CATALAN NUMBER

class Solution {
public:
int numTrees(int n) {
long int result = 1;
for(int i = 1; i <= n; ++ i)
result = result * 2 * (2 * i - 1) / (i + 1);
return result;
}
};