LeetCode
Unique Binary Search Trees II
Click
here
for an explanation.