+ 2
Which sorting method is best?and why?
6 Answers
+ 6
https://www.sololearn.com/learn/774/?ref=app
'When choosing a sorting algorithm, you need to consider the amount of data you are sorting and how much time you have to implement the algorithm.
For example, QuickSort is a very efficient, but can be pretty tricky to implement. Bubble Sort is simple to implement, but slow. To sort small sets of data, Bubble Sort may be a better option since it can be implemented quickly, but for larger datasets, the speed of QuickSort might be worth the work of implementing the algorithm.'
You can't say xyz is algorithm is best for any sorting!!
+ 5
It also depends on the specific case. If you have a list with 5 million items and only the first two elements are unsorted, bubble sort might be noticeably faster than quick sort
+ 2
thanks both
+ 1
Check my code for sorting set of numbers (array) :
https://code.sololearn.com/cxjhxc6ywwqL
It may help you.
Thanks!
+ 1
Quick sort and Merge sort follows divide and conquer strategy and has good time complexity. They can be implemented for larger data sets.
For smaller data sets, you may apply simple Bubble sort or Selection sort which are easier to implement.
0
in big data cases good data preparation and combining matters much more than particular algoritm. so well prepared and splited datasets are better and faster to use without sorting and long searches. you might save data in a right way on the fly. just a note from a conference