This repository has been archived on 2022-06-22. You can view files and clone it, but cannot push or open issues or pull requests.
usaco-guide/content/6_Plat/String_Search.mdx

91 lines
2.7 KiB
Text
Raw Normal View History

2020-06-22 14:26:06 +00:00
---
id: string-search
title: "String Searching"
author: Benjamin Qi
2020-07-13 15:46:26 +00:00
prerequisites:
2020-06-22 20:51:12 +00:00
- Silver - Depth First Search
2020-06-22 19:59:16 +00:00
description: Knuth-Morris-Pratt and Z Algorithms (and a few more related topics).
2020-06-28 16:03:46 +00:00
frequency: 1
2020-06-22 14:26:06 +00:00
---
2020-06-28 02:11:09 +00:00
export const metadata = {
problems: {
sample: [
2020-06-28 03:56:39 +00:00
new Problem("YS", "Set XOR-Min", "set_xor_min", "Easy", false, [], ""),
2020-06-28 02:11:09 +00:00
],
2020-06-28 03:56:39 +00:00
Z: [
new Problem("YS", "Z Algorithm", "zalgorithm", "Easy", false, [], ""),
2020-07-13 15:46:26 +00:00
new Problem("CF", "Concatenation with Intersection", "contest/1313/problem/E", "Hard", false, [], "")
2020-06-28 03:56:39 +00:00
],
pal: [
new Problem("ojuz", "Palindrome", "APIO14_palindrome", "Easy", false, [], ""),
]
2020-06-28 02:11:09 +00:00
}
};
## General
<resources>
2020-06-28 03:56:39 +00:00
<resource source="CPC" title="11 - Strings" url="11_strings">String Matching, KMP, Tries</resource>
2020-06-28 02:11:09 +00:00
</resources>
2020-06-28 03:56:39 +00:00
# Single String
2020-06-22 14:26:06 +00:00
2020-06-28 02:11:09 +00:00
## KMP
2020-06-28 03:56:39 +00:00
<resources>
<resource source="cp-algo" title="Prefix Function" url="prefix-function.html"></resource>
<resource source="PAPS" title="14.2 - String Matching"></resource>
<resource source="GFG" title="KMP Algorithm" url="searching-for-patterns-set-2-kmp-algorithm"></resource>
<resource source="TC" title="String Searching" url="introduction-to-string-searching-algorithms"></resource>
</resources>
2020-06-28 02:11:09 +00:00
## Z Algorithm
2020-06-28 03:56:39 +00:00
<problems-list problems={metadata.problems.Z} />
2020-06-22 14:26:06 +00:00
2020-06-28 03:56:39 +00:00
<resources>
<resource source="cp-algo" title="Z Function" url="z-function.html"></resource>
<resource source="CPH" title="26.4 - Z-algorithm"></resource>
<resource source="CF" title="Z Algorithm" url="blog/entry/3107"></resource>
</resources>
2020-06-22 14:26:06 +00:00
## Manacher
2020-06-28 03:56:39 +00:00
<resources>
<resource source="HR" title="Manacher's Algorithm" url="https://www.hackerrank.com/topics/manachers-algorithm"></resource>
<resource source="CF" title="adamant - Manacher's algorithm and code readability" url="blog/entry/12143" starred>shorter code</resource>
<resource source="cp-algo" title="Manacher's Algorithm" url="string/manacher.html"></resource>
</resources>
# Multiple Strings
2020-06-22 14:26:06 +00:00
2020-06-28 03:56:39 +00:00
## Tries
2020-06-25 15:52:19 +00:00
2020-06-28 03:56:39 +00:00
<problems-list problems={metadata.problems.sample} />
<resources>
<resource source="CPH" title="26.2"></resource>
<resource source="CF" title="Algorithm Gym" url="blog/entry/15729"></resource>
<resource source="PAPS" title="14.1 - Tries"></resource>
</resources>
2020-06-28 02:11:09 +00:00
2020-06-28 03:56:39 +00:00
## Aho-Corasick
2020-06-28 02:11:09 +00:00
2020-06-28 03:56:39 +00:00
<resources>
<resource source="cp-algo" title="Aho Corasick" url="string/aho_corasick.html"></resource>
<resource source="CF" title="adamant - Aho-Corasick" url="blog/entry/14854"></resource>
<resource source="GFG" title="Aho-Corasick for Pattern Searching" url="aho-corasick-algorithm-pattern-searching"></resource>
</resources>
2020-06-28 02:11:09 +00:00
2020-06-28 03:56:39 +00:00
## Palindromic Tree
2020-06-28 02:11:09 +00:00
2020-06-28 03:56:39 +00:00
<problems-list problems={metadata.problems.pal} />
2020-06-26 01:51:05 +00:00
2020-06-28 03:56:39 +00:00
<resources>
<resource source="CF" title="adamant - Palindromic Tree" url="blog/entry/13959"></resource>
</resources>
2020-06-26 01:51:05 +00:00
2020-07-13 15:46:26 +00:00
DMOJ thing