Algorithms on String
Here is a list of some common string algorithms:
- String searching algorithms: algorithms for finding a pattern in a string, such as
Rabin-Karp Algorithm (Rolling Hash), theKnuth-Morris-Pratt (KMP)algorithm and theBoyer-Moore algorithm. - String matching algorithms: algorithms for determining whether a string matches a given pattern, such as
regular expressionmatching andfinite automatabased matching. - String manipulation algorithms: algorithms for manipulating strings, such as string concatenation, string reversal, and string
permutationgeneration. - String compression algorithms: algorithms for compressing strings, such as
Huffman codingandrun-length encoding. - String sorting algorithms: algorithms for sorting strings, such as
radix sortandmulti-key quicksort. - String parsing algorithms: algorithms for extracting information from strings, such as regular expression parsing and parsing of structured data formats (e.g., CSV, JSON).
- String hashing algorithms: algorithms for computing hash values for strings, such as the SHA-2 and SHA-3 algorithms.
- String transformation algorithms: algorithms for transforming strings, such as case conversion, character encoding and decoding, and transliteration.
- String similarity algorithms: algorithms for measuring the similarity between two strings, such as the
Levenshtein distanceand theJaccard coefficient. - String correction algorithms: algorithms for correcting errors in strings, such as spelling correction and grammar correction.
Standard Problems
- Exact Pattern Matching: Given a string
textand stringpattern, output all the position intextwherepatternappears as a substring. - Approximate Pattern Matching: Given a string
textand stringpattern, output all the position intextwherepatternappears as a substring with at mostdmismatches. - Multiple Pattern Matching: Given a string
textand a set of stringpatterns, output all the position intextwhere a string frompatternsappears as a substring.