You get a bonus - 1 coin for daily activity. Now you have 1 coin

Select sorting method

Lecture



Each programmer must have a wide range of sorting algorithms. Despite the fact that, on average, fast sorting is optimal, it is not the best in all cases. For example, when sorting very small lists (for example, fewer than 100 items), the additional amount of work created by recursive quick sort calls can outweigh the advantages of its better algorithm. In such rare cases, one of their simple sorting methods — perhaps even bubble sorting — can work faster. In addition, if it’s known that the list is almost orderly, or if you don’t want to rearrange the same keys, some other algorithm will work better than a quick sort. The essence of the above is that just the fact that quick sorting is the best general-purpose algorithm does not mean that in specific cases other approaches will not give better results.

Comments


To leave a comment
If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Algorithms

Terms: Algorithms