Given two strings A and B, find the minimum number of steps required to convert A to B. (each operation is counted as 1 step.)
You have the following 3 operations permitted on a word:
The first argument of input contains a string, A. The second argument of input contains a string, B.
Return an integer, representing the minimum number of steps required.
1 <= length(A), length(B) <= 450
Input 1: A = "abad" B = "abac" Output 1: 1 Explanation 1: Operation 1: Replace d with c. Input 2: A = "Anshuman" B = "Antihuman" Output 2: 2 Explanation 2: => Operation 1: Replace s with t. => Operation 2: Insert i.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.