Typos in dynamic programming section?
SUPERCILEX opened this issue · 4 comments
https://en.algorithmica.org/hpc/external-memory/locality/#dynamic-programming
The state can be updated in O(1) time per entry **if consider** either taking or not taking the
. There should probably be a "we" in there, but I'm not sure.
Also, the code examples seem to interchange w
and c
. Unless I'm missing something, those should be the same variable. In addition, it's confusing to talk about a constant w
and then later use k
for that.
There's also a typo in the C style for loop: for (int i = n - 1; i >= 0; i++)
. That iterates until overflow. It also mixes c
and w
.
Again for the single layer example, a
and c
came out of nowhere. Presumably they're the same as w
and c
from earlier.
Fixed the variable names.
Thank you!