```
public class Solution {
public int getMaxRepetitions(String s1, int n1, String s2, int n2) {
int x = s2.length();
int j = 0;
int count = 0;
for (int i = 0 ; i< s1.length(); i++){
char ci = s1.charAt(i);
char cj = s2.charAt(j);
if (ci == cj){
j++;
}
if ( j == x){
j = 0;
count ++;
}
}
if (count ==0)
{return 0;}
else{
return (n1 /n2)*count;
}
}
Teast case Failing :
Input:
"lovenicoloveliveniconiconiconiniconjcoaaajo"
201641
"lovenanjo"
401
Output:
0
Expected:
251
}
```