Math
96. Unique Binary Search Trees
Only the count is needed, and the shape count depends solely on how many nodes there are, not their values. With i nodes, choosing the root position j puts j-1 nodes on the left and i-j on the right,…
Loading…
Only the count is needed, and the shape count depends solely on how many nodes there are, not their values. With i nodes, choosing the root position j puts j-1 nodes on the left and i-j on the right,…
Loading…