Solved LeetCode program · 62 of 1,000
#0062 · Unique Paths
Original English source
The rows is 3. The columns is 7. The size is the product of rows and columns. The table is a list of size zeros.
For every position from 0 to one less than size.
The row is position divided by columns. The column is position modulo columns. If row is 0 or column is 0, set item position of table to 1. If row is more than 0 and column is more than 0, set item position of table to item (position minus columns) of table plus item (position minus 1) of table.
The last is one less than size. Report item last of table.
Expected stdout
28