###### Middle-题目12：96. Unique Binary Search Trees

Given n, how many structurally unique BST’s (binary search trees) that store values 1…n?

For example,
Given n = 3, there are a total of 5 unique BST’s.

   1         3     3      2      1
\       /     /     /  \      \
3     2     1      1   3      2
/     /       \                 \
2     1         2                 3

n个节点的二叉排序树有几种？

public class Solution {
public int numTrees(int n) {
int[] catalan=new int[]{1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 208012, 742900, 2674440, 9694845, 35357670, 129644790, 477638700, 1767263190};
return catalan[n];
}
}

0ms,beats 2.75%,众数0ms,92.25%.
Cmershen的碎碎念：

#### 96 Unique Binary Search Trees

2015-11-25 21:04:50

#### LeetCode96:Unique Binary Search Trees

2015-06-24 15:56:10

#### LeetCode 96 — Unique Binary Search Trees（C++ Java Python）

2014-04-01 21:07:32

#### [leetcode-96]Unique Binary Search Trees(c++)

2015-08-10 15:14:02

#### LeetCode 96:Unique Binary Search Trees

2015-12-31 16:35:13

#### leetcode-java-96. Unique Binary Search Trees

2016-06-30 10:08:42

#### LeetCode || Unique Binary Search Trees

2014-04-09 23:16:41

#### Unique Binary Search Trees -- LeetCode

2014-04-30 06:16:29

#### 95 Unique Binary Search Trees II

2015-11-28 12:59:53

#### LeetCode | Unique Binary Search Trees II

2013-12-23 14:58:40

## 不良信息举报

Middle-题目12：96. Unique Binary Search Trees