Repeated String from HackerRank

Repeated String Frequency of letter a in repeated string There is a string ,s, of lowercase English letters that is repeated infinitely many times. Given an integer ,n, find and print the number of letter a’s in the first n letters of the infinite string. Example s=”abcac” n=10 The substring we consider is abcacabcac, the first …

Repeated String from HackerRank Read More »