skip to main content
10.1145/1734263.1734392acmconferencesArticle/Chapter ViewAbstractPublication PagessigcseConference Proceedingsconference-collections
research-article

Double sorting: testing their sorting skills

Published: 10 March 2010 Publication History

Abstract

You're teaching elementary sorting techniques, and you would like your students to do a programming assignment that tests their understanding of the ideas. But all of the code for elementary sorting techniques are in the textbook, easily found on the Web, etc. We suggest the use of two "Double Sorting" techniques whose solution is not standardly available, are fairly straight-forward to code, and offer speed improvements over the "straight" sorts. Double Sorting, the idea of processing two chosen elements simultaneously, applies to both Insertion Sort and Selection Sort, with speedups of 33% and 25%, hence are good enough to justify coding, but not good enough to be in Web collections. Code for this can be written in as little as a dozen lines of C++/Java code, and is easily within the reach of introductory students who understand the basic algorithms. In addition, the ideas used for double sorting are natural first steps in understanding how the N2 sorts can be improved towards the N log N sorts that they will study later. For more advanced students, these double sorts also generate good exercises in the analysis of algorithms.

References

[1]
Cutter, P. and Schultz, K. 2004. Assignments to Use Next Week: Tutorial Presentation. J. of Computing Sciences in Colleges 20(1), Oct. 2004, p. 114.
[2]
Gordon, S. 2007. Benchmark of Sorting Algorithms on Arrays. http://pr.stewartsplace.org.uk/d/sortbench.d
[3]
Julstrom, J., 1992. Slow Sorting: A Whimsical Inquiry. ACM SIGCSE Bulletin 24(3), Sept. 1992, pp. 11--13.
[4]
Merritt, S., and Nauch, C., 1990. Inventing A New Sorting Algorithm: A Case Study. ACM SIGCSE Bulletin 22(1), Feb. 1990, pp. 181--185.
[5]
Rolfe, T., 2005. List processing: sort again, naturally. ACM SIGCSE Bulletin 37(2), June 2005, pp. 46--48.
[6]
VBExplorer, 2004. Sorting Viewer - Sorting Methods Discussed. http://www.vbexplorer.com/VBExplorer/vb_feature/august2000/sv4.asp

Index Terms

  1. Double sorting: testing their sorting skills

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    SIGCSE '10: Proceedings of the 41st ACM technical symposium on Computer science education
    March 2010
    618 pages
    ISBN:9781450300063
    DOI:10.1145/1734263
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 10 March 2010

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. cs1
    2. insertion
    3. quicksort
    4. selection
    5. sorting

    Qualifiers

    • Research-article

    Conference

    SIGCSE10
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 1,595 of 4,542 submissions, 35%

    Upcoming Conference

    SIGCSE TS 2025
    The 56th ACM Technical Symposium on Computer Science Education
    February 26 - March 1, 2025
    Pittsburgh , PA , USA

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • 0
      Total Citations
    • 360
      Total Downloads
    • Downloads (Last 12 months)13
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 13 Jan 2025

    Other Metrics

    Citations

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media