RabinKarp Class |
Namespace: Algs4Net
public class RabinKarp
The RabinKarp type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | MainTest |
Takes a pattern string and an input string as command-line arguments;
searches for the pattern string in the text string; and prints
the first occurrence of the pattern string in the text string. |
![]() | Search |
Returns the index of the first occurrrence of the pattern string
in the text string. |
For additional documentation, see Section 5.3 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.
This class is a C# port from the original Java class RabinKarp implementation by the respective authors.