Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 960415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:10:47+00:00 2026-05-16T01:10:47+00:00

i´m trying to sort a list of combinations in a specific way. Consider the

  • 0

i´m trying to sort a list of combinations in a specific way.
Consider the numbers 1-6 as teams, if every team can play on time against each other team we got this list as possible matches:

12 23 34 45 56
13 24 35 46 
14 25 36        
15 26           
16

So now what i want is something like “matchdays”:

12    13    14    15    16
34    46    26    24    23
56    25    35    36    45

As you can see after each block every team has one game, two games, …
I could´n get a algorithm to sort the list this from:

12 13 14 15 16 23 24 25 26 34 35 36 45 46 56

to

12 34 56 13 46 25 14 26 35 15 24 36 16 23 45

Additional:
With odd team numbers the way to create matchdays gets even worse because you have to leave on team out for the day:

12 23 34 45
13 24 35    
14 25       
15  

12    23    14    24    25
34    45    35    15    13

In the first block 5 is not playing in the second block 1 ist not playing….

Thank you for any help or ideas regarding this problem in c# with .net 4 possibly using Linq to manipulate the list.

SOLUTION:

Round-robin tournament
http://en.wikipedia.org/wiki/Round-robin_tournament
Round Robin Tournament algorithm in C#

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T01:10:48+00:00Added an answer on May 16, 2026 at 1:10 am

    You dont really need to sort this (from what I can see).

    All you need to do is create ‘sets’ of 3 items, where an item is {A,B} for the 2 teams.

    So for the start, pick any random item (and remove from list of all combinations), then you have say: {1,3}. Then choose another random number (and remove) where {A,B} != 1 or 3 for both A and B. The last step is easy, as you only have 2 options left. Pick any valid option, remove from list. Repeat 4 more times.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am desperately trying to find a way to sort a List of strings,
Hello Trying to sort this list by Month and day. Can not get it
Hi: I'm trying to sort a list of tuples in a custom way: For
Trying to sort an array by name so I can display an alphabetical list.
I am trying to sort a list of names followed by another string such
I'm trying to sort a list of CLLocationDistance values by closest distance (ascending order).
I'm trying to sort a list (part of a class) in descending order containing
I'm trying to sort a list with the help of jQuery and the TinySort
I am trying to sort a list based on data attributes with tinysort .
I'm trying to sort a list and to check my sorting algorithm is working

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.