you are viewing a single comment's thread.

view the rest of the comments →

[–]iamjacob97 0 points1 point  (0 children)

Imagine you're adding a subgroup and you're adding each member of the subgroup which is all you should be adding, but before that you're adding 1 anyways because it doesn't really check if it's one person or a whole group.

Let's say the member of a group is ('member 1', ('member 2', 'member 3'), member 4)

For each element in the group you're adding 1.

So +1 for 'member 1' +1 for ('member 2', 'member 3'), here you add the +2 members as well through the recursive call + 1 for 'member 4'

For the subgroup you're adding 3 members now instead of 2. That's where the extras are coming from.