We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc9e6c1 commit b355c68Copy full SHA for b355c68
src/string/multiple_longest_common_subsequence.rs
@@ -88,12 +88,11 @@ impl Context {
88
// for each string, finds the next position of that letter
89
let mut succ: Vec<Option<usize>> = vec![];
90
for (i, p_ith_elt) in p.iter().enumerate().take(self.chains.len()) {
91
-
92
let next_ch_idx = match p_ith_elt {
93
Some(idx) => self.mt[ch_idx][i][idx + 1],
94
None => continue, // Skip if current position is None
95
};
96
+
97
// in case the letter is not reachable in the string
98
if next_ch_idx.is_none() {
99
break;
@@ -488,4 +487,4 @@ mod tests {
488
487
),
489
490
}
491
-}
+}
0 commit comments