Can someone help out how to find minimum edit distance between deep and creepy which is shown in practice quiz?

Can someone help out how to find minimum edit distance between deep and creepy which is shown in practice quiz ?

Hi @Siva_Kumar1

I’m not sure that I can reveal the whole solution, but I can help you get on track:

One of the ways to find the minimum edit distance:

  • creepy → delete “c” → reepy (cost of delete)
  • reepy → replace “r” with “d” → deepy (cost of replace)
  • deepy → delete “y” → deep (cost of delete)

So, minimum edit distance should be:

  • delete_cost + replace_cost + delete_cost

Cheers