When I sort an Array using the native sort method, which algorithm does Ruby use?
sort
Is it data-dependant, i.e., if the data is small it uses X algorithm
Look here: http://www.igvita.com/2009/03/26/ruby-algorithms-sorting-trie-heaps/
It does natively use quicksort however, which is n log n complexity on average.