go to previous page   go to home page   highlighting

Answer:

No.

The problem with selection sort is the algorithm, not the programming language. The algorithm uses a doubly nested loop, which will result in N2 behavior 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