ELI5: Explain Like I'm 5

Lee distance

Imagine you have two words, like "cat" and "bat". The Lee distance is a way of measuring how different those two words are.

To find the Lee distance between "cat" and "bat", we need to look at each letter in turn. The first letter is "c" in "cat" and "b" in "bat". These are different letters, so we add 1 to our Lee distance.

The second letter is "a" in both words, so there is no difference there. We don't need to add anything to our Lee distance.

The third letter is "t" in "cat" and "b" in "bat". These are different letters again, so we add 1 to our Lee distance.

Now we have added up all the differences between the two words, which gives us a Lee distance of 2.

In general, the Lee distance between two words is the shortest number of operations (adding, deleting, or changing a letter) required to transform one word into the other. So, if we wanted to turn "cat" into "bat", we would need to change the "c" to a "b" and the "t" to an "a", which takes 2 operations.