diff options
Diffstat (limited to '01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance')
7 files changed, 26 insertions, 0 deletions
diff --git a/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/edit_distance.cpp b/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/edit_distance.cpp new file mode 100644 index 0000000..fd7d16e --- /dev/null +++ b/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/edit_distance.cpp @@ -0,0 +1,17 @@ +#include <iostream> +#include <string> + +using std::string; + +int edit_distance(const string &str1, const string &str2) { + //write your code here + return 0; +} + +int main() { + string str1; + string str2; + std::cin >> str1 >> str2; + std::cout << edit_distance(str1, str2) << std::endl; + return 0; +} diff --git a/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/tests/01 b/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/tests/01 new file mode 100644 index 0000000..367ac87 --- /dev/null +++ b/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/tests/01 @@ -0,0 +1,2 @@ +ab +ab diff --git a/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/tests/01.a b/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/tests/01.a new file mode 100644 index 0000000..573541a --- /dev/null +++ b/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/tests/01.a @@ -0,0 +1 @@ +0 diff --git a/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/tests/02 b/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/tests/02 new file mode 100644 index 0000000..3ef52c8 --- /dev/null +++ b/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/tests/02 @@ -0,0 +1,2 @@ +short +ports diff --git a/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/tests/02.a b/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/tests/02.a new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/tests/02.a @@ -0,0 +1 @@ +3 diff --git a/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/tests/03 b/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/tests/03 new file mode 100644 index 0000000..cc5b276 --- /dev/null +++ b/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/tests/03 @@ -0,0 +1,2 @@ +editing +distance diff --git a/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/tests/03.a b/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/tests/03.a new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/01-algorithmic_toolbox/04-dynamic_programming/03-edit_distance/tests/03.a @@ -0,0 +1 @@ +5 |