What is the significance of selection sort? It has a time complexity of O(n^2) even in best case scenario. So why is it still prevalent?
1条回答
- It is simple to write and intuitive for people to understand
- It is the closest to the way real humans approach sorting lists.
- It functions in-place in memory
- After n iterations you know the first n elements are sorted. After the first iteration the first item is sorted, after the second is finished the first 2 are sorted, etc...
查看更多
0人赞
添加讨论(0)
举报
相关问题
- How to toggle on Order in ReactJS
- PHP Recursively File Folder Scan Sorted by Modific
- Finding k smallest elements in a min heap - worst-
- binary search tree path list
- Change sort order of strings includes with a speci
相关文章
- What are the problems associated to Best First Sea
- Coin change DP solution to keep track of coins
- Sort TreeView Automatically Upon Adding Nodes
- Algorithm for partially filling a polygonal mesh
- Robust polygon normal calculation
- Algorithm for maximizing coverage of rectangular a
- Why does array_unique sort the values?
- How to measure complexity of a string?