algorithm - What's the quickest way to find all possible pairs in list? -


basically have list of players, , want pair them each player play once. what's quickest way find data?

assuming players not appear in list twice, double for loop quick:

for (int i=0, <= playerlist.count - 2, i++)     (int j=i+1, j <= playerlist.count - 1, j++)         //add new pairing of player , j 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -