go to previous page   go to home page  

Answer:

No.

The problem with selection sort is the algorithm, not in the programming language. The algorithm uses a doubly nested loop, which will result in N2 behaviour in any language. Implementing the algorithm in a super efficient language (like assembly language) has the effect of lowering K in Time ≅ K*N2, but with large N N2 will be very large and running time will still be slow.


End of Chapter

The next chapter will discuss insertion sort, another simple sort.

Select a few of the following topics to review:


go to previous page   go to home page