soulmachine / leetcode

LeetCode题解,151道题完整版。
BSD 3-Clause "New" or "Revised" License
11.27k stars 3.43k forks source link

Update chapTree.tex #14

Closed x1957 closed 10 years ago

x1957 commented 10 years ago

Unique Binary SearchTrees 时间复杂度O(n^2)

for (int i = 2; i <= n; ++i) { for (int k = 1; k <= i; ++k) f[i] += f[k-1] * f[i - k]; }

soulmachine commented 10 years ago

Good job!