Abstract

When I teach sorting algorithms in our introductory computer science class, I always wonder how I can convince the students of the efficiency of O (n log n) sorts, and their complex code, vs. the ease of writing O (n2) sorts. With today's personal computers, even bubble sorting an array of a few thousand items appears to occur instantaneously. In addition, most textbooks provide the program code for implementing most of the standard sorting algorithms, such as bubble sort, selection sort, and quick sort. Since our introductory course has a closed lab period each week, I looked for something to do with my students when it came to sorting. Making them type in the code that was in the book seemed a waste of time.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.