Skip to content

Create a new Rabin-Karp Algorithm #3201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 5, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update RabinKarpAlgorithmTest
  • Loading branch information
tackhwa authored Aug 3, 2022
commit d57b635f0c3908a81d5f83d71b0cffad9184a2f3
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class RabinKarpAlgorithmTest {
String txt = "This is an example for rabin karp algorithmn";
String pat = "algorithmn";
int value = RKA.search(pat, txt, q);
System.out.println(value);
assertEquals(value,34);

}
Expand All @@ -35,7 +34,6 @@ class RabinKarpAlgorithmTest {
String txt = "AAABBDDG";
String pat = "AAA";
int value = RKA.search(pat, txt, q);
System.out.println(value);
assertEquals(value, 0);

}
Expand All @@ -49,7 +47,6 @@ class RabinKarpAlgorithmTest {
String txt = "AAABBCCBB";
String pat = "BBCC";
int value = RKA.search(pat, txt, q);
System.out.println(value);
assertEquals(value, 3);

}
Expand All @@ -63,7 +60,6 @@ class RabinKarpAlgorithmTest {
String txt = "AAAABBBBCCC";
String pat = "CCC";
int value = RKA.search(pat, txt, q);
System.out.println(value);
assertEquals(value, 8);

}
Expand All @@ -77,7 +73,6 @@ class RabinKarpAlgorithmTest {
String txt = "ABCBCBCAAB";
String pat = "AADB";
int value = RKA.search(pat, txt, q);
System.out.println(value);
assertEquals(value, -1);

}
Expand Down