From 0bc44a8bcf77a81677d8257eb5c4190ff5d5dd73 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 14 Nov 2016 06:44:59 +0100 Subject: Algorithms : add 04-algorithms_on_strings 02-burrows_wheeler --- .../02-bwtinverse/bwtinverse.cpp | 25 ++++++++++++++++++++++ .../02-burrows_wheeler/02-bwtinverse/tests/sample1 | 1 + .../02-bwtinverse/tests/sample1.a | 1 + .../02-burrows_wheeler/02-bwtinverse/tests/sample2 | 1 + .../02-bwtinverse/tests/sample2.a | 1 + 5 files changed, 29 insertions(+) create mode 100644 04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse/bwtinverse.cpp create mode 100644 04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse/tests/sample1 create mode 100644 04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse/tests/sample1.a create mode 100644 04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse/tests/sample2 create mode 100644 04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse/tests/sample2.a (limited to '04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse') diff --git a/04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse/bwtinverse.cpp b/04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse/bwtinverse.cpp new file mode 100644 index 0000000..3ec7c54 --- /dev/null +++ b/04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse/bwtinverse.cpp @@ -0,0 +1,25 @@ +#include +#include +#include +#include + +using std::cin; +using std::cout; +using std::endl; +using std::string; +using std::vector; + +string InverseBWT(const string& bwt) { + string text = ""; + + // write your code here + + return text; +} + +int main() { + string bwt; + cin >> bwt; + cout << InverseBWT(bwt) << endl; + return 0; +} diff --git a/04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse/tests/sample1 b/04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse/tests/sample1 new file mode 100644 index 0000000..d2dd621 --- /dev/null +++ b/04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse/tests/sample1 @@ -0,0 +1 @@ +AC$A diff --git a/04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse/tests/sample1.a b/04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse/tests/sample1.a new file mode 100644 index 0000000..e73cda6 --- /dev/null +++ b/04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse/tests/sample1.a @@ -0,0 +1 @@ +ACA$ diff --git a/04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse/tests/sample2 b/04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse/tests/sample2 new file mode 100644 index 0000000..29e4fc0 --- /dev/null +++ b/04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse/tests/sample2 @@ -0,0 +1 @@ +AGGGAA$ diff --git a/04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse/tests/sample2.a b/04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse/tests/sample2.a new file mode 100644 index 0000000..ee229a2 --- /dev/null +++ b/04-algorithms_on_strings/02-burrows_wheeler/02-bwtinverse/tests/sample2.a @@ -0,0 +1 @@ +GAGAGA$ -- cgit v1.2.3