MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / clear

Method clear

code/strings/suffix_automaton.cpp:12–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10 suffix_automaton() : len(MAXL*2), link(MAXL*2),
11 occur(MAXL*2), next(MAXL*2), isclone(MAXL*2) { clear(); }
12 void clear() { sz = 1; last = len[0] = 0; link[0] = -1;
13 next[0].clear(); isclone[0] = false; }
14 bool issubstr(string other){
15 for(int i = 0, cur = 0; i < size(other); ++i){
16 if(cur == -1) return false; cur = next[cur][other[i]]; }

Callers 1

extendMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected