96. Unique Binary Search Trees
# Medium

Solution:
Initialize
dp[n+1],dp[0]=1. Think about how to computed[i]and the value ofdp[1]should be.Move root until
ith, sum all of the possible roots, then getdp[i].Return
dp[n]
Time complexity = , space complexity =
Last updated
Was this helpful?