Title: Resorting Lists Application Cards

Author: Kate

Date: April 19, 2004

Technique: Application Cards

Before Class Preparation Time: LOW

Class Completion Time: MEDIUM

In-Class Analysis Time: MEDIUM

Out-Of-Class Analysis Time: MEDIUM

Assessment Goals:
Topics:
Purpose:

Instructors can find out how well students understand how to select a sorting algorithm for reordering a list that's already been sorted under a different criterion.


Activity:

Read the following scenario and answer the two questions. Be certain to back up your decisions.

You have been given a file of all the undergraduates majoring in computer science at your university. This list contains each student's name and and GPA ans is sorted in alphabetical order by their names. Your task is to sort the students by their GPAs (note that if two students have the same GPA, they should then be sorted by their names).

  1. How would you sort this list?
  2. What if you were asked to do this for the entire undergraduate body of your university?

Solution:

Student answers will vary greatly. There are two key points to focus on, though. The first is to see if students mention using a stable sort to resort the list. Secondly, do students discuss computational efficiency? This point is of particular value on question 2.


Instructor Responses: Response Analysis:

Read through the applications and sort or mark them as "Good," "Acceptable," "Marginal," or "Wrong." Read through the piles again to make sure that you have not accidently misclassified a response. You might also want to sort the responses by the type of sorting algorithm used.

Choose three or four of the best examples from the "Good" pile. Emphasize understandability, but try to have a diversity of example domains. Also consider a few acceptable and marginal responses that highlight points you wish to discuss.

If you use an application in class as a bad or poor example, change the application just enough to disguise the example from the original authors.



Variant Uses of Activity:
Device-Enabled: Difficult to Enable

Related Topics: