Design Patterns for Sorting Algorithms

2019 
This Innovative Practice Work-in-Progress Paper presents an alternative approach to teach algorithms using design patterns. The traditional approach to teaching different algorithms is to introduce each algorithm as a stand-alone approach. For example, when one goes over different sorting algorithms, one may start with logically simpler sorts like bubble sort or selection sort, and progress to the more challenging algorithms like heap sort or merge sort. We argue that there is another way to introduce a family of algorithms – identify the design patterns common to a group of algorithms, introduce the patterns first, before differentiating one approach from another. In this way, we focus on overall constructs and operations required, rather than how to complete each one of the sorts separately.This approach allows for an abstract class, such as Sort, to be first identified from a top-down approach, followed by the introduction and identification of which design patterns an actual algorithm falls - say divide-and-conquer for merge sort. The advantage of the approach is to allow the student to explore new realizations of solutions to problems developed from the abstract class, rather than studying a specific implementation of an algorithm.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    1
    References
    1
    Citations
    NaN
    KQI
    []