Given a string A consisting of N characters and a string B consisting of M characters, returns the number of times A must be stated such that B is a substring of the repeated string. If B can never be a substring of the repeated A then your functions should return -1.

EX:

```
A = "abcd"
B = "cdabcdab"

```

Function should return 3 because after stating string A three times we obtain the string "abcdabcdabcd". String B is a substring of this string.

**Attempt:** currently stuck here - trying to construct and algorithm first before I begin to write code - can really use a push here. I'm trying to think of the minimum length A has to be before it contains B as a substring. Not sure if this is the right approach.