Friday, October 17, 2014

Unique Binary Search Trees II

Problem

Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.

For example,
Given n = 3, your program should return all 5 unique BST's shown below.

Idea

思路看这里

Solution


No comments:

Post a Comment