MAOMislive / Edit_distance_count

This is a problem which is asked to solve in my Data Structure & Algorithm Lab.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

forthebadge made-with-java
Given two strings string1 and string2 and we have to perform operations on string1. Find minimum number of edits (operations) required to convert ‘string1 ’ into ‘string2’.

We can do these three operation:

  1. Insert a character at any position of the string.
  2. Remove any character from the string.
  3. Replace any character from the string with any other character.

Now, modify your offline code to consider the following costs for each operation:

  • Insert : 1
  • Remove: 1
  • Replace: 2

Finally, print the total cost to convert String1 to String2.

About

This is a problem which is asked to solve in my Data Structure & Algorithm Lab.


Languages

Language:Java 100.0%