Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
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.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.