AlgoMaster Logo

Unique Binary Search Trees II

n=3
0 / 9
unique BSTs for 1..31230 / 5root 1root 2root 3pick each value as the root, combine all left × right subtrees
algomaster.io
Step:Generate every unique BST holding the values 1..3