【Leetcode】Unique Binary Search Trees
摘要:
假设给定n个节点,节点值为1,2,3...,n,求由这些结点可以构成多少棵不同的二叉查找树。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 ... 阅读全文
浙公网安备 33010602011771号