0w1

Entries from 2016-10-02 to 1 day

Template Suffix Tree ( Ukkonen's Algorithm )

search - Ukkonen's suffix tree algorithm in plain English? - Stack Overflow Suffix tree. Ukkonen's algorithm - Codeforces struct suffix_tree{ char s[ MAXN ]; map< int, int > to[ MAXN ]; int len[ MAXN ], fpos[ MAXN ], link[ MAXN ]; int node…

Template Suffix Link Trie

// multiple pattern -- a.k.a. aho-corasick // O( T + P ) string text; vs pattern; struct trie{ vector< trie* > ch; trie *sfx; // suffix link: links to the end of the longest matched suffix trie *dict_sfx; // links to the end of suffix link…