Title: Memory Usage Sorting Application Card
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:
- Develop ability to apply principles and generalizations already learned
- Learn concepts and theories in the subject
- Develop capacity to think for oneself
- Develop ability to think creatively
- Develop ability to draw reasonable inferences from observations
Topics:
- Real World Scenarios
- Sorting
- Memory
- Efficiency
- In-place sorting
Purpose:
Instructors can find out how well students understand how to select a sorting algorithm for a scenario involving limited memory availability.
Activity:
Read the following scenario and answer the question. Be certain to back up your decisions.
The system you are designing requires a sort routine. Unfortunately, memory usage is at such high cost on this machine that you cannot afford to have much (if any overhead) in your sorting algorithm.
What would you do?
Solution:
Student answers will vary greatly. Most importantly, students should at least mention the notion of in-place sorting. Another aspect to consider is if students consider the length of the list to be sorted or how it is represented in memory.
Instructor Responses:
- Lecture
- Next Day Summary
- Class Discussion
- Small Group Discussions
- Homework
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:
- Have students write applications individually and submit these to the instructor anonymously. The instructor reads the applications and the class discusses the merits of such an application. The instructor might want to describe what the code would look like for some of the applications.
- Each student writes an application and explains their application to the rest of the class.
- Break students into small groups (2-4 people) and have each group find two or more applications. Have each group explain their applications to the rest of the class.
Device-Enabled: Difficult to Enable
Related Topics:
- Design
- Algorithms
- Data structures
- Efficiency