summaryrefslogtreecommitdiffstats
path: root/04-algorithms_on_strings/02-burrows_wheeler/01-bwt
diff options
context:
space:
mode:
Diffstat (limited to '04-algorithms_on_strings/02-burrows_wheeler/01-bwt')
-rw-r--r--04-algorithms_on_strings/02-burrows_wheeler/01-bwt/bwt.cpp25
-rw-r--r--04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample11
-rw-r--r--04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample1.a1
-rw-r--r--04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample21
-rw-r--r--04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample2.a1
-rw-r--r--04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample31
-rw-r--r--04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample3.a1
7 files changed, 31 insertions, 0 deletions
diff --git a/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/bwt.cpp b/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/bwt.cpp
new file mode 100644
index 0000000..f3b0497
--- /dev/null
+++ b/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/bwt.cpp
@@ -0,0 +1,25 @@
+#include <algorithm>
+#include <iostream>
+#include <string>
+#include <vector>
+
+using std::cin;
+using std::cout;
+using std::endl;
+using std::string;
+using std::vector;
+
+string BWT(const string& text) {
+ string result = "";
+
+ // write your code here
+
+ return result;
+}
+
+int main() {
+ string text;
+ cin >> text;
+ cout << BWT(text) << endl;
+ return 0;
+} \ No newline at end of file
diff --git a/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample1 b/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample1
new file mode 100644
index 0000000..0c6ef1d
--- /dev/null
+++ b/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample1
@@ -0,0 +1 @@
+AA$
diff --git a/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample1.a b/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample1.a
new file mode 100644
index 0000000..0c6ef1d
--- /dev/null
+++ b/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample1.a
@@ -0,0 +1 @@
+AA$
diff --git a/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample2 b/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample2
new file mode 100644
index 0000000..761dc40
--- /dev/null
+++ b/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample2
@@ -0,0 +1 @@
+ACACACAC$
diff --git a/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample2.a b/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample2.a
new file mode 100644
index 0000000..96b7811
--- /dev/null
+++ b/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample2.a
@@ -0,0 +1 @@
+CCCC$AAAA
diff --git a/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample3 b/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample3
new file mode 100644
index 0000000..93070cb
--- /dev/null
+++ b/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample3
@@ -0,0 +1 @@
+AGACATA$
diff --git a/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample3.a b/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample3.a
new file mode 100644
index 0000000..30ee3ea
--- /dev/null
+++ b/04-algorithms_on_strings/02-burrows_wheeler/01-bwt/tests/sample3.a
@@ -0,0 +1 @@
+ATG$CAAA