MCPcopy Create free account
hub / github.com/Jonathan-Uy/CSES-Solutions / query

Function query

String Algorithms/Finding Patterns.cpp:50–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50bool query(){
51 int u = 0;
52 for(int i = 0; i < M; i++){
53 char c = T[i];
54 if(!node[u].nxt.count(c)) return false;
55 else u = node[u].nxt[c];
56 }
57 return true;
58}
59
60int main(){
61 scanf(" %s %d", S, &K);

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected