Shouldn’t
P[i][delta] = P[i - 1][delta], if s[i] == w[i + delta] ?
Shouldn’t
P[i][delta] = P[i - 1][delta], if s[i] == w[i + delta] ?
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!
thanks, corrected.
Great to fellow programmers referring to research papers, @kaushik_iiitd and yes (Y) for @sereja 
higher quality PDF of the paper available here @ Algorithms for approximate string matching - ScienceDirect
I referenced this diagram (@ http://i.stack.imgur.com/2LtnD.png) instead for my implementation (which turns out to be WA) is there a way to reconcile the two? meaning how should I setup the for-loops to iterate the correct bounds as necessary to compute the final answer?
I edited my ans with link of my solution, see if it helps.
I have to agree. I think the tags are a bit off this time.
ChefSquare = easy, SeaStr = easy-med and Qstring - med (considering O(log n) per query)
alright, will take a look at it. thanks
Its in the medium section though @wittyceaser. So even if anybody practices he’ll find it in medium!
Yup, I saw that but my intention was to address this issue on an overall basis and not just this problem.
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…
Please update author’s solution
Please update author’s and tester’s solution…
waiting for authors solution…
Waiting for author’s, setter’s and editorialist’s solution, DAY 201