Leetcode 95. Unique Binary Search Trees II
Generate all structurally distinct binary search trees that store values 1..n and return them as tree roots. This is a classic divide-and-conquer / DP enumeration problem (Catalan-number growth, n ≤ 8) where each value is tried as root and all combinations of left/right subtrees are combined.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.