Skip to content

Add Levenshtein Distance #414

Open
@yurifilgueira

Description

@yurifilgueira

The Levenshtein distance algorithm calculates the minimum number of edits (insertions, deletions, or substitutions) needed to transform one string into another. It utilizes a matrix to store the distances between all prefixes of the two strings, and iteratively fills this matrix using dynamic programming. The final value in the matrix represents the Levenshtein distance between the two original strings.

  • Implement the algorithm: Write a function levenshtein_distance(string1, string2) that accurately calculates the Levenshtein distance between two input strings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions