Notes: I\'ve thought about Radix sort, bucket sort, counting sort.
Is there anyway to achieve big O(n)?
Using Radix Sort (In Ruby):
def sort(array) sorted_array = Array.new(100,[]) array.each do |t| sorted_array[t-1] = sorted_array[t-1] + [t] end sorted_array.flatten! end