Skip to content

Instantly share code, notes, and snippets.

View AsithaIndrajith's full-sized avatar
🏠
Working from home

Asitha AsithaIndrajith

🏠
Working from home
View GitHub Profile

What is Minimum Edit Distance?

Convert a string into a another string by using minimum number of operations.

ex: Convert "dog" into "cat"

  • 1.modify "d" into "c"
  • 2.modify "o" into "a"
  • 3.modify "g" into "t"
    So we have to do 3 operations.

Minimum Edit Distance By Using Dynamic Programming

  • Draw memoization matrix.
  • Write converting string's characters along y axis and converted string along x axis.