Given two strings source_string and target_string, compute the minimum number of operations required to convert source_string into target_string. Allowed operations are: insert a character, delete a character, or replace a character.
Example 1
Input: source_string=abc, target_string=yabd
Output: 2
Explanation: Replace a with y, insert d at the end.
Example 2
Input: source_string=kitten, target_string=sitting
Output: 3
Explanation: Replace k with s, replace e with i, insert g at the end.
Constraints
Case 1
Input: source_string='algorithm', target_string='logarithm'
Expected: 3
Case 2
Input: source_string='flaw', target_string='lawn'
Expected: 2
Case 3
Input: source_string='distance', target_string='instance'
Expected: 2
Case 4
Input: source_string='abcd', target_string='efgh'
Expected: 4
Case 5
Input: source_string='', target_string='abc'
Expected: 3