4 ms·
In which case do you wind up with distance=2? I figured it'd jump out at me in an obvious way, but it hasn't.
by developer2 7y ago
In which case do you wind up with distance=2? I figured it'd jump out at me in an obvious way, but it hasn't.
- bryondowd 7y agoCan't think on a real word example, but abc would match bcd in the above algo, as both permute to bc, but they are distance 2. So, any case where one letter is deleted and another is added at a different position.
- aripickar 7y agoBoat and Oats is a real world example with Levenshtein distance 2 that would pass through the algo
- apendleton 7y agoYeah, that's the crux -- two different real words storing the same variant but having omitted different letters.
- developer2 7y agoHaha, I knew the answer was going to be obvious, and it was so obviously obvious. Thanks for answering. :)