score:10

Accepted answer
private IEnumerable<List<int>> FooSplit(IEnumerable<int> items)
{
    List<int> source = new List<int>(items);
    while (source.Any())
    {
        var result = source.Distinct().ToList();
        yield return result;
        result.ForEach(item => source.Remove(item));
    }
}

Usage:

int[] items =  { 1, 1, 2, 2, 3, 3, 3, 4 };

foreach(var subList in FooSplit(items))
{
    // here you have your three sublists
}

Here is another solution, which is less readable but it will have better performance:

private IEnumerable<IEnumerable<int>> FooSplit(IEnumerable<int> items)
{
    var groups = items.GroupBy(i => i).Select(g => g.ToList()).ToList();    

    while (groups.Count > 0)
    {
       yield return groups.Select( g => 
             { var i = g[0]; g.RemoveAt(g.Count - 1); return i; });
       groups.RemoveAll(g => g.Count == 0);
    }
}

score:1

this does the job:

    static void Main(string[] args)
    {
        int[] numbers = {1, 1, 2, 2, 3, 3, 3, 3, 4, 5, 5};
        List<int> nums = new List<int>(numbers.Length);
        nums.AddRange(numbers);

        while (nums.Count > 0)
        {
            int[] n = nums.Distinct().ToArray();
            for (int i = 0; i < n.Count(); i++)
            {
                Console.Write("{0}\t", n[i]);
                nums.Remove(n[i]);
            }
            Console.WriteLine();
        }

        Console.Read();
    }

score:1

Here's an alternative console app:

class Program
{
    class Freq
    {
        public int Num { get; set; }
        public int Count { get; set; }
    }

    static void Main(string[] args)
    {
        var nums = new[] { 1, 1, 2, 2, 3, 3, 3, 4 };
        var groups = nums.GroupBy(i => i).Select(g => new Freq { Num = g.Key, Count = g.Count() }).ToList();
        while (groups.Any(g => g.Count > 0))
        {
            var list = groups.Where(g => g.Count > 0).Select(g => g.Num).ToList();
            list.ForEach(li => groups.First(g => g.Num == li).Count--);
            Console.WriteLine(String.Join(",", list));
        }

        Console.ReadKey();
    }

}

Related Query

More Query from same tag