Implement three bottom-up dynamic programs.
coin_change_ways(coins, amount)
amount. Each coin may be used any number of times and order does not matter: for coins [1, 2] and amount 3, {1, 1, 1} and {1, 2} are the two ways. Return 1 for amount 0.coin_change_orderings(coins, amount)
amount. For coins [1, 2] and amount 3, the sequences are 1+1+1, 1+2 and 2+1, so the answer is 3.max_grid_points(grid)
grid is a list of lists of non-negative integers. Starting at the top-right cell and moving only down or left one cell at a time, return the maximum total of the cell values collected on a path that ends at the bottom-left cell. Both endpoints count. Return 0 for an empty grid.All three functions must return Python integers and run in time proportional to the size of their table.
[1, 2], 3 which nesting counts 1+2 and 2+1 once and which counts them twice.