The Full Counting Sort

  • + 10 comments

    I was having problems with testcase #5. Then I realized that I was using Console.WriteLine inside the loop, and this is VERY slow, specially for 1M entries. So, I used a StringBuilder and printed everything in the end. I went from more than 3s to 0.89s. The problem is not always with your algorithm, but it may be with the way your are printing.