Sorting algorithm substituting the prebuilt 'sort' function in MATLAB
이전 댓글 표시
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
per isakson
2016년 11월 20일
답변 (1개)
Prasad Mendu
2016년 11월 23일
0 개 추천
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:
카테고리
도움말 센터 및 File Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!