Update levenshteinDistance.md
This commit is contained in:
committed by
GitHub
parent
83d21b8cf2
commit
d96b0e36d9
@ -3,7 +3,7 @@ title: levenshteinDistance
|
||||
tags: string,algorithm,intermediate
|
||||
---
|
||||
|
||||
Calculates the difference between two strings.
|
||||
Calculates the difference between two strings, using the [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) algorithm.
|
||||
|
||||
- If either of the two strings has a `length` of zero, return the `length` of the other one.
|
||||
- Use a `for` loop to iterate over the letters of the target string and a nested `for` loop to iterate over the letters of the source string.
|
||||
|
||||
Reference in New Issue
Block a user