eli5 what’s the point of having so many sorting algorithms if the primary objective is to sort, i mean why can’t we just use one algorithm for all

594 views

eli5 what’s the point of having so many sorting algorithms if the primary objective is to sort, i mean why can’t we just use one algorithm for all

In: 6

24 Answers

Anonymous 0 Comments

Sorting algorithms have strengths and weaknesses: memory usage, number of comparisons, varying performance in edge cases, multithreading capability, ease of implementation, etc. This means that there is usually some algorithm or a variation of one that fits your specific use case and available resources better than most or all other algorithms. An algorithm that performs marginally better than another can save minutes, hours, or days of data processing on ginormous amounts of data.

You are viewing 1 out of 24 answers, click here to view all answers.