Tally the Number of Friend Groups with K Sets of Matching Traits π°
Once upon a time, in a land filled with numbers, there was a group of friends called "friendsList." They were on a quest, guided by a positive number named "minimumPairs." Their mission was to count how many groups of adjacent friends there were, where at least "minimumPairs" of them shared the same characteristics.
In other words, they needed to find out how many groups of friends walked together, where there were twice as many friends (each at different positions) who were just like each other, as required by the "minimumPairs" rule.
After exploring their journey for a while, they came back with the total count of such groups, having completed their mission successfully.
For original prompt, please refer to source image. π³
1Example 1
2Example 2
Constraints
Limits and guarantees your solution can rely on.
Unknown for now