Skip to content

Commit 3feba01

Browse files
author
Rami Chasygov
authored
fix: typo (TheAlgorithms#352)
1 parent 83ad008 commit 3feba01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dynamic_programming/edit_distance.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub fn edit_distance_se(str_a: &str, str_b: &str) -> u32 {
7676
min(c + 1, distances[j] + 1),
7777
);
7878
// c is updated to distances[i][j], and will thus become distances[i][j-1] for the next cell
79-
s = distances[j]; // here distances[j] means distances[i-1][j] becuase it has not been overwritten yet
79+
s = distances[j]; // here distances[j] means distances[i-1][j] because it has not been overwritten yet
8080
// s is updated to distances[i-1][j], and will thus become distances[i-1][j-1] for the next cell
8181
distances[j] = c; // now distances[j] is updated to distances[i][j], and will thus become distances[i-1][j] for the next ROW
8282
}

0 commit comments

Comments
 (0)