Skip to main content

CS201: Elementary Data Structures

Page path
  • Home /
  • Courses /
  • Course Catalog /
  • Computer Science /
  • CS201: Elementary Data Structures /
  • Unit 7: Searching and Sorting Algorithms /
  • 7.3: Why Sort? Insertion Sort and Merge Sort
Back to 'Unit 7: Searching and Sorting Algorithms'
  • 7.3: Why Sort? Insertion Sort and Merge Sort

    • Massachusetts Institute of Technology: Srini Devadas' "Insertion Sort and Merge Sort" Page

      Why bother with sorting data? This lecture discusses that question and then goes into two different sorting methods. You will notice that many search algorithms assume sorted data, especially with the large data volumes that are common today.

    • Massachusetts Institute of Technology: Eric Grimson and John Guttag's "Divide and Conquer Methods, Merge Sort, and Exceptions" Page

      Watch this lecture to learn about the divide-and-conquer approach to sorting and its application to merge sorts. This approach is especially worthwhile when multiple computing cores are available, either with or without shared memory. Each divided component can be exercised independent of the other components. The merge step brings it all together. Divide-and-conquer applies to more than just sorting methods, but we focus on that in this lecture.

    • 7.3.1: Big-O Analysis of Merge and Insertion Sort

      • York College of Pennsylvania: David S. Babcock's "Insertion Sort" Page

        Read this efficiency analysis of insertion sort. The pseudocode is easily reformatted for C/C++. Efficiency analysis is important when selecting solution methods appropriate for the application and situation.

      • York College of Pennsylvania: David S. Babcock's "Merge Sort" Page

        This page presents an efficiency analysis of merge sort. It will help you choose the sorting algorithm appropriate to your project's requirements and situation. For instance, if data arrives over time, insertion sort using linked lists may well be the best choice. You certainly do not want to re-sort the entire collected data just to add one element. Most demonstrations of sorting methods assume that a large block of data already exists and that the task is to sort that data block. The case of data arriving over time is rarely considered but that is often the case in modern industrial and commercial applications. The "Internet of Things" (IoT) is a prime example, as is ongoing retail sales.

    • 7.3.2: Merge and Insertion Sort in C/C++

      • Examples of Insertion and Merge Sorts in C++ Page

        Since the lectures in this unit use Python, review these examples of Insertion and Merge sorts in C++.

Navigation

Art History
Biology
Business Administration
Chemistry
Communication
Economics
English
History
Mathematics

Creative Commons License
© Saylor Academy 2010-2018 except as otherwise noted. Excluding course final exams, content authored by Saylor Academy is available under a Creative Commons Attribution 3.0 Unported license. Third-party materials are the copyright of their respective owners and shared under various licenses. See www.saylor.org/open/licensinginformation for detailed licensing information.

Saylor Academy and Saylor.org® are trade names of the Constitution Foundation, a 501(c)(3) organization through which our educational activities are conducted.

Terms of Use | Privacy Policy