summaryrefslogtreecommitdiff
path: root/string/levenshtein.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'string/levenshtein.cpp')
-rw-r--r--string/levenshtein.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/string/levenshtein.cpp b/string/levenshtein.cpp
index d1980f8..f0df66b 100644
--- a/string/levenshtein.cpp
+++ b/string/levenshtein.cpp
@@ -1,3 +1,4 @@
+// Laufzeit: O(nm), Speicher: O(m), n = #s1, m = #s2
int levenshtein(string& s1, string& s2) {
int len1 = s1.size(), len2 = s2.size();
vector<int> col(len2 + 1), prevCol(len2 + 1);
@@ -9,4 +10,4 @@ int levenshtein(string& s1, string& s2) {
col.swap(prevCol);
}
return prevCol[len2];
-} \ No newline at end of file
+}