Instructors can find out how well students understand how to select an approach for implementing a solution to a scenario involving efficiently inserting and removing data as a batch process.
Read the following scenario and answer the question. Be certain to back up your decisions.
You are the manager of a collection of data that keeps track of the current undergraduate students in the department. The department head wants the data sorted in alphabetical order. Each night, you receive a list of new undergrad students that have been admitted, as well as a list of students who have the left department due to sudden, acute insanity. Since the department head is monitoring your computer usage, your code must be able to handle this batch insertion and deletion as efficiently as possible.
How would you implement a solution to this removing/resorting problem?
Student answers will vary greatly. The two conflicting issues of efficient removal and efficient resorting should be discussed.
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 algorithms are 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.