Algorithms

Edit distance

The fewest 1-letter changes (insert, delete or replace) needed to turn one text into another. It measures how similar they are.

Example

From «kitten» to «sitting» there are 3 changes: k to s, e to i, and adding a g at the end.

Test yourself: Edit distance

Edit distance

From «kitten» to «sitting» the edit distance is ___.

Lessons that use it

More algorithms terms

All terms →

Arki, the beaver mascot

Your next interview starts with 5 minutes today.

Free on iOS and Android. Start from zero, no account needed.