Computer Science Illuminated

Interactive Review

Animated Flashcards
Live Wire
Cryptic Crossword Puzzles
Ethical Issues
Biographical Sketches
Did You Know?
Goin Live
Digital Lab Manual
Online Glossary
The Learning Store
Language Library
Download PEP/7
Instructor Resources
Student Resources

eLearning Home

Efficiency of Different Sorting Algorithms

Download the Cover Sheet for this lab as an Adobe PDF. This can be used to record your answers to the questions in the lab.

In Chapter 9, three sorting algorithms were presented and discussed: selection sort, bubble sort, and Quicksort. In this lab, you will experiment with each of these algorithms by changing the size of the list to be sorted and observing the number of times the contents of two places are swapped. The number of swaps is often used to measure sorting efficiency.

Go to each of the pages listed below and follow the directions.

Selection Sort

Short Bubble


Insertion Sort

Look carefully at the number of swaps required in each case. From what you know of the algorithms, would you say that the number of swaps is a good measure to use to compare these algorithms? Explain your answer.


Educators: More Information About This Text Other Computer Science Titles at Jones and Bartlett
Copyright 2021 Jones and Bartlett PublishersContact webmaster