Yeah that works , thanks @kaushik_iiitd
your solution fails for this test case
1
abcde
aa
0 1 0
exp ans=0
your ans=-1
try returning 0 whenever value of a=0(there are definitely some cases regarding this as i was too stuck) since there is no need for further computation as deleting the entire first string and inserting the other would take 0 min operations
guys do some smart workā¦ instead of pasting your entire code ā¦ simply provide a link to your solutionā¦ it will be more friendly to othersā¦
Iām trying to solve this problems with above idea, but I get WA, I donāt know whatās wrong with my code?
Here is my code : http://www.codechef.com/viewsolution/5163464
Could anyone give me a hint why Iām wrong?
Thank you! ^^
Please update authorās solution
Authorās and Setterās solutions please
Please update authorās and testerās solutionā¦
Can anyone explain Restricted Edit Distance in some another manner ?
Iām not able to understand that how we are going to reduce the size of the array d that we are using to store edit distance.
Shouldnāt
P[i][delta] = P[i - 1][delta], if s[i] == w[i + delta] ?
waiting for authors solutionā¦
Waiting for authorās, setterās and editorialistās solution, DAY 201
nice editorial.
Hey guys, I made a video editorial on this technique here:
Itās been a long while, but the algorithm is still great!
Cheers!