Collection of algorithms for String Algorithms course (summer semester 2019/20) at Jagiellonian University, Theoretical Computer Science Department.
- Morris-Pratt and Knuth-Morris-Pratt algorithms
- Boyer-Moore algorithm with many variants
- fast-on-average algorithm
- Constant space: two-way (Crochemore-Perrin) algorithm
- Karp-Rabin hashing-based algorithm
- Suffix tree: Weiner, McCreight and Ukkonen algorithms
- Suffix array: Karp-Miller-Rosenberg and Kärkkäinen-Sanders algorithms
- Maximum suffix algorithms: based on prefix-suffix array, in constant space
- Longest common subsequence: Needleman-Wunsch and Hirschberg algorithms
- String matching with don't care symbols: algorithm based on FFT
Run all tests:
python3 -B -m unittest discover test -v
Run example large test:
LARGE=1 python3 -B -m unittest test.test_exact_string_matching.TestExactStringMatching.test_random_exact_string_matching -v