Notes: I\'ve thought about Radix sort, bucket sort, counting sort.
Is there anyway to achieve big O(n)?
Here is a counting sort in scala:
val res = Array.fill (100)(0) val r = util.Random // generate data to sort val nums = for (i <- 1 to 1000*1000) yield r.nextInt (100) for (i <- nums) res(i) += 1 println (res.mkString (" "))