public class RepeatedSubString {
public static void main(String[] args) {
String str = "aba";
int repeatCount = 10;
String checkFor = "a";
long result = checkRepeatedCharCount(str, repeatCount, checkFor);
[Link](result);
private static Long checkRepeatedCharCount(String str, int repeatCount, String checkFor) {
int strLength = [Link]();
StringBuilder sb = new StringBuilder(str);
int counter = 0;
for (int i = 0; i < repeatCount - strLength; i++) {
if (counter < strLength) {
[Link]([Link](counter));
counter++;
}
if (counter > strLength - 1) {
counter = 0;
}
List<Character> list = new ArrayList<>();
for (char ch : [Link]().toCharArray()) {
[Link](ch);
}
[Link]([Link]());
Map<Object, Long> optional = [Link]().sorted().filter(n -> [Link]('a'))
.collect([Link](n -> n, [Link]()));
[Link](optional);
long val = 0;
for ([Link]<Object, Long> entry : [Link]()) {
// Object key = [Link]();
val = [Link]();
return val;
}
return val;