What is the fastest sorting algorithm for a small number of integers?

后端 未结 12 3161
青春惊慌失措
青春惊慌失措 2021-02-20 18:45

I am wondering what the fastest algorithm would be for this. I have 8 integers between 0 and 3000 and I need to sort them. Although there are only 8 integers, this operation w

12条回答
  •  南笙
    南笙 (楼主)
    2021-02-20 19:21

    A good source for comparing sorting algos is http://www.sorting-algorithms.com/. Note that even the initial order status affect the results. But anyway for 8 integers even a plain bubble sort should do the job.

提交回复
热议问题