Sorting algorithm substituting the prebuilt 'sort' function in MATLAB
Mostrar comentarios más antiguos
I am given a .mat file with 90+ countries (AUS,CAD,USA etc) and we are supposed to sort it alphabetically before we could use it for further processing. The problem is, I am not allowed to use a prebuilt sorting function. How should the sorting algorithm look like?
Thanks
1 comentario
per isakson
el 20 de Nov. de 2016
Respuestas (1)
Prasad Mendu
el 23 de Nov. de 2016
0 votos
As Per Iskakson mentioned in the comments, you can start off with Bubble sort and then explore other sorting algorithms that have less time complexity.
Some useful links to look at:
Categorías
Más información sobre Shifting and Sorting Matrices en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!