Levenshtein Distance (Execution Time Mode)

by @AlimadCoโ€ขabout 1 month ago
Featured

๐Ÿ“ Description

The Levenshtein distance is a string metric for measuring the difference between two sequences. The Levenshtein distance between two words is the minimum number of single-character edits (insertions, deletions or substitutions) required to change one word into the other.

๐Ÿ“ฅ Input

Type: string[]

Two strings in an array

๐Ÿ“ค Output

Type: number

Levenshtien distance between the strings

๐Ÿงช Sample Test Cases

Input:

["banana", "apple"]

Output:

5

Input:

["apples are amazing", "no, apples bad and not amazing"]

Output:

14

+ 1 more test cases will be used for validation

๐Ÿ’ป Code Editor

Loading...
Sign in to submit solutions

๐Ÿ† Leaderboard