Company: NxtWave
Difficulty: medium
Aquarium Gate Groups An aquarium logs every visitor who steps through its entrance turnstile. Each visitor is either an Adult (marked \'A\') or a Child (marked \'B\'). Visitors always pass through clustered into tour groups, and the log reaches you as two arrays: The first array lists every visitor in the exact order they passed the turnstile, using \'A\' for an adult and \'B\' for a child. The second array lists the number of visitors making up each successive group. From these two arrays, work out the following three counts: The number of solo-adult groups, meaning a lone adult who passed through without any accompanying child. The number of kids-only outings, defined as a group of 3 or more children with no adult present. The number of family groups, where a family is any group of size 3 or 4 containing at least one adult and at least one child. Input Format The first line contains an integer representing the size of array Attendees The second line contains an array representing the