Available question text
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.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 95. Unique Binary Search Trees II
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source