when both the character is same , the condition that sir given in video os wrong , i think the coreect is given below
correction:- if( inp[i-1]==out[j-1] ){ dp [ i ][ j ] = dp [ i-1 ][ j-1 ] ; }
please check whether i am correct or not
when both the character is same , the condition that sir given in video os wrong , i think the coreect is given below
correction:- if( inp[i-1]==out[j-1] ){ dp [ i ][ j ] = dp [ i-1 ][ j-1 ] ; }
please check whether i am correct or not
please do provide the video link also from which your asking your doubts…
in the competetive programming course
cp course of edit distance dp question
both are correct . In the video while explaining Memoization - Top Down approach is used in which if character is same we increase both i and j. And the condition you have given here is of Bottom Up approach i.e. Tabulation.
You are correct.
Reference: https://discuss.codechef.com/t/wa-edit-distance-edist-spoj/26657/2?u=hetp111
The bottom up is incorrect.
refer: https://discuss.codechef.com/t/wa-edit-distance-edist-spoj/26657/2
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
okay i thought he was asking about top down approach. I Didn’t notice this in the video i will ask the admin to resolve it.