-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathedit-distance.js
More file actions
47 lines (45 loc) · 817 Bytes
/
Copy pathedit-distance.js
File metadata and controls
47 lines (45 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/**
* Source: https://leetcode.com/problems/edit-distance/
* Tags: [Dynamic Programming,String]
* Level: Hard
* Title: Edit Distance
* Auther: @imcoddy
* Content: Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)
*
*
*
* You have the following 3 operations permitted on a word:
*
*
*
* a) Insert a character
* b) Delete a character
* c) Replace a character
*
*
*
* Subscribe to see which companies asked this question
*
*
*
*
*
*
*
*
*
*
*
*
* Show Similar Problems
*
*
* (M) One Edit Distance
*/
/**
* @param {string} word1
* @param {string} word2
* @return {number}
*/
var minDistance = function(word1, word2) {
};