Question discussion

What is the minimum number of single-character insertions, deletions and substitutions needed to convert the string 'kitten' into 'sitting'?

1952Medium DSSSB TGT Computer Science 0 replies 1 views
0

What is the minimum number of single-character insertions, deletions and substitutions needed to convert the string 'kitten' into 'sitting'?

  • A3
  • B2
  • C4
  • D5
Correct answer: A

Explanation

Substitute k with s, substitute e with i and insert g at the end, giving an edit distance of 3.

Discussion 0

Nobody has replied yet. Start the discussion!