Skip to content
Get started

From STATISTICS to STOCHASTIC

The edit (Levenshtein) distance is the minimum number of single-character insertions, deletions and substitutions turning one word into another. What is the edit distance from STATISTICS to STOCHASTIC?

Show hints (2)+
  1. Set up D[i][j]D[i][j] over prefixes with three moves: delete, insert, substitute-or-match.
  2. Look for a long shared block that sits one position apart in the two words.

Answer

Reveal answer →

5

Create a free account to see the full worked solution and track your progress.

Interview format: Prop Trading

Related questions