• Dynamic programming
  • Substring
  • edit_string_algorithm
  • One string should be converted to other string, add, delete and replace operations are allowed.
  • Applications:
    • Compression algorithms.
    • Match names to find similarity between strings to find people.
    • Google pattern recognition. Trie
  • If one string is empty then other string length is the answer.
  • How to write program for same?
 
int minimum = Math.min(1,2);
int ans = Math.min(minimum, 4);
 
//single line 
return 1 + Math.min(ED)