90. Unique Binary Search Trees II

Return all unique BSTs of n nodes with values from 1 to n.
Example 1
Input: n = 1
Output: [[1]]
Explanation: The only tree with one node.
Example 2
Input: n = 3
Output: 5 деревьев
Explanation: For n=3, there are 5 unique BSTs.
hardrecursiontree
JavaScript
Loading...
Line 1, Char 1