The original code did not work correctly out of the box. It generated a (4,5) grid instead of a (5,4) grid as the book's answer grid shows. Also on line 10 of my code I changed `dp_table[i-1][i-1] + 1` to `dp_table[i-1][j-1] +1`. I also updated the display to display by row.
Co-authored-by: WhileRested <148598154+WhileRested@users.noreply.github.com>