EDIST - Edit distance
You are given two strings, A and B. Answer, what is the smallest number of operations you need to
transform A to B?
- Delete one letter from one of strings
- Insert one letter into one of strings
- Replace one of letters from one of strings with another letter
T - number of test cases
For each test case:
- String A
- String B
Both strings will contain only uppercase characters and they won't be longer than 2000 characters.
There will be 10 test cases in data set.
For each test case, one line, minimum number of operations.
Input: 1 FOOD MONEY Output: 4
Aqib Ahmed J:
AC in one go :) My 2nd DP problem :)
Hi guys, I am getting a WA if I use it in C++ strings... If do it using the char array in C it is being accepted....
Got AC for bottom-up. TLE for top-down. Why? Also why locally declared array is giving SIGSEGV?
simple Wagner Algo!
My 2nd DP AC , After Many RE(SIGSEGV) , Feels Good <3
In top down approach initialize 2d array of 2101*2101 to get AC else u will get RTE(SIGSEGV) .. :)
My 2nd DP problem....took time to think...but finally AC in one go....;)
why declaring globally remove sigsegv error
use bottomup approach it will pass
can anyone explain why does it give a SIGSEGV error on declaring the 2D array inside a function?