Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

char s 1 [ 9 ] = superhero ; char s 2 [ 8 ] = theropod ; intn = 9 ; int m =

char s1[9]=superhero; char s2[8]=theropod; intn=9;
int m=8;
int [][] states = int [n+1][m+1];
for (int i =0; i <= n; i++){ states[i][0]= i;
}
for (int j=0; j<=m; j++){ states[0][j]= j;
}
for (int i =1; i <= n; i++){ for (int j=1; j<=m; j++){
if (s1[i1]== s2[j1]){ states[i][j]= states[i1][j1];
}else{
states[i][j]=1+ min(states[i1][j], min(states[i][j1], states[i1][j1]));
}}
}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

How do books become world of wonder?

Answered: 1 week ago

Question

If ( A^2 - A + I = 0 ), then inverse of matrix ( A ) is?

Answered: 1 week ago

Question

Understanding Groups

Answered: 1 week ago