Looks to me like you wanna make a list out of the group. You add a first_in_group, last_in_group, next_in_group and prev_in_group pointers, and when someone starts a group he is set as first_in_group for himself and the people who joined him, then for every person who joins, he is added to the last_in_group's next_in_group.
Then all you have to do to make the list is start from the first_in_group and work your way through the next_in_group until you hit the last_in_group
|