It seems like this should be a simple task, but I can't figure out how to do this with LINQ. The only information that I have been able to find so far concerns the format of the tournament with a round-robin tournament, which is not what I need. Maybe I'm wrong. Given the following list:
var items [] { "apple", "banana", "banana", "candy", "banana", "fruit", "apple" };
How can I sort this (preferably using linq) so that it comes out in the order of "round robin", i.e. Each individual item was selected once before repeating. So the above list will come out as follows (it doesn't matter if it comes out in alphabetical order, even if this list does):
var sorted [] { "apple", "banana", "candy", "fruit", "apple", "banana", "banana" };
I know that I can do this, iterate along this difficult path, I just hoped for something simpler. Does anyone know how to do this? Thanks in advance!
source share