Hi,
in the hints of the assignment notebook wrt Dynamic Programming fcn, it’s stated to check source[i]==target[j],
but shouldn’t it be source[i-1]==target[j-1] ?
Hi,
in the hints of the assignment notebook wrt Dynamic Programming fcn, it’s stated to check source[i]==target[j],
but shouldn’t it be source[i-1]==target[j-1] ?
Hi, Fabian.
If I understand your question correctly, then in the HINTS (as in text part of Part 4.1 Dynamic Programming) it shouldn’t - the text is correct:
But maybe your doubts come from your code in # UNQ_C11:
So in this case your loops start from 1, but string indexing (of both source and target) starts from 0 and you have to compensate for that and this might explain your confusion?