When I sort an Array using the native sort
method, which algorithm does Ruby use?
Is it data-dependant, i.e., if the data is small it uses X algorithm else it uses Y algorithm?
Is it a stable sort? What is the average time complexity?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…