This algorithm scans the line and tries to find another line. I suppose the logic is simple. Although I need help finding complexity.
int find(string mString, string lookUp) { int i, z, j, m = mString.size(), n = lookUp.size(), broken = 0, st = 0; for(j = 0, i = 0; i < m; i++) { if(mString[i] == lookUp[j]) { if(broken) {
Can someone please help me?
Thanks.
source share