Home > Back-end >  Jmu data structure of 3 discuss zyy group experiment
Jmu data structure of 3 discuss zyy group experiment

Time:05-10

Data structure course requirements in the BBS for group discussion, this is zyy group experimental discussion post


Bool isExist (string s1, string s2)
{
Int jug.
Jug=s1. The find (s2);
If (jug!=1) return true;
else return false;
}

More convenient method is to use c + + the find function directly in s1 to s2 to find

Regular writing either

Bool isExist (string s1, string s2) {
Int m=strlen (s1);
Int n=strlen (s2);
If (n==0) return 0;

for(int i=0; iInt j=0;
Int t=I;
While (s1==s2 [t] [j] & amp; & jk++;
j++;
If (s1 [t]! [j]=s2 & amp; & jbreak;
}

}
If (j)==n {
return true;
}
}
return false;
}
  • Related