in reply to best way to keep track of who's friends with whom
Are you asking about how to work with the data when it is in memory or how to store it long term for each user?
Long term storage is normally handled by a database and you would likely use a cross reference database table whose primary key includes the ids of both friends. To make sure you don't double add friend pairs you would need a rule for deciding which of any two friends goes in the first key field and which goes in the second key field.
If you already know how you are storing your friends pairs, but just want to know a good data structure for manipulating the information in memory, then you will need to provide more information. The best data structure will depend on how you are planning to use the data.
Best, beth
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: best way to keep track of who's friends with whom
by dsheroh (Monsignor) on Oct 05, 2009 at 10:26 UTC | |
by bart (Canon) on Oct 05, 2009 at 17:24 UTC | |
|
Re^2: best way to keep track of who's friends with whom
by leocharre (Priest) on Oct 05, 2009 at 13:38 UTC |