Pattern occurrences

Sign in to test your solution.