Solved LeetCode program · 96 of 1,000
#0096 · Unique Binary Search Trees
Original English source
The target is 5. The size is target plus 1. The ways is a list of size zeros. Set item 0 of ways to 1.
For every count from 1 to target.
For every split from 0 to one less than count.
The before is item split of ways. The afterposition is count minus 1 minus split. The after is item afterposition of ways. Increase item count of ways by before times after.
Show item target of ways.
Expected stdout
42