Code Explainers

Code explainers tagged #space-optimization

rust
pub fn levenshtein(a: &str, b: &str) -> usize {
    let a: Vec<char> = a.chars().collect();
    let b: Vec<char> = b.chars().collect();
 

Levenshtein distance with two rows in Rust

dynamic-programming edit-distance space-optimization
Intermediate 6 steps