Retired
DP - Edit Distance (retired)
15Bkucera
Description:
Edit distance is the minimum number of steps to get from one word to another.
A step is defined by:
- Deletion of one character anywhere in the string
- Insertion of one character anywhere in the string
- Replacement of one character anywhere in the string
For example, EditDistance("sunday", "saturday") could resolve in the following way:
- sunday -> surday
- surday -> sturday
- sturday -> saturday
resulting in a minumum edit distance of 3, as that is the minimum amount of steps.
Write a function that takes in the two words and returns the edit distance, and is efficient enough only to not timeout. (Brute force solution is acceptable)
Algorithms
Dynamic Programming
Programming Paradigms
Similar Kata:
Stats:
Created | Mar 26, 2017 |
Warriors Trained | 75 |
Total Skips | 3 |
Total Code Submissions | 56 |
Total Times Completed | 15 |
JavaScript Completions | 15 |
Total Stars | 0 |
% of votes with a positive feedback rating | 40% of 10 |
Total "Very Satisfied" Votes | 3 |
Total "Somewhat Satisfied" Votes | 2 |
Total "Not Satisfied" Votes | 5 |
Total Rank Assessments | 11 |
Average Assessed Rank | 5 kyu |
Highest Assessed Rank | 3 kyu |
Lowest Assessed Rank | 8 kyu |