algo4: dp: Unique paths II