Click here to Skip to main content
15,867,835 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
The challenge is not how to implement it. I know how. Instead, the question is what sorting algorithm needs to be used to get the fastest sorting performance especially when the number of words increase in the sentence. Quick sorting is believed to be the fastest when it comes to numbers to sort, but is that still true when it comes to strings sort alphabetically?

Thanks, Azbilegt Chuluunbat

What I have tried:

The challenge is not how to implement it. I know how. Instead, the question is what sorting algorithm needs to be used to get the fastest sorting performance especially when the number of words increase in the sentence. Quick sorting is believed to be the fastest when it comes to numbers to sort, but is that still true when it comes to strings sort alphabetically?

Thanks, Azbilegt Chuluunbat
Posted
Updated 21-Dec-20 20:07pm

1 solution

Quote:
Quick sorting is believed to be the fastest
It is statistically very good, anyway, there are alternatives. See, for instance Analysis of different sorting techniques - GeeksforGeeks[^].


Quote:
when it comes to numbers to sort, but is that still true when it comes to strings sort alphabetically
Since they are (like numbers) (alphabetically) ordered, that doesn't really matter.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900