#include <algorithm>
#include <string>
#include <unordered_map>
|
namespace | dsac |
| Code from the zyBook "Data Structures and Algorithms in C++" by Goodrich/Tamassia/Mount/Goldwasser.
|
|
namespace | dsac::text |
| Code from the chapter "Text Processing".
|
|
|
int | dsac::text::find_brute (const std::string &text, const std::string &pattern) |
| Returns the lowest index at which substring pattern begins in text (or else -1)
|
|
int | dsac::text::find_boyer_moore (const std::string &text, const std::string &pattern) |
| Returns the lowest index at which substring pattern begins in text (or else -1).
|
|
std::vector< int > | dsac::text::compute_kmp_fail (const std::string &pattern) |
| Returns the failure table for Knuth, Morris Pratt algorithm.
|
|
int | dsac::text::find_kmp (const std::string &text, const std::string &pattern) |
| Returns the lowest index at which substring pattern begins in text (or else -1).
|
|