Levenshtein Distance (Execution Time Mode)
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
6.5