ESTIMATING A LABORATORY EXECUTION EXERCISE TIMES: FOR CS2 William J. Collins Computer Science Department Lafayette College PA 18042 Easton, ABSTRACT A laboratory exercise for CS2 In the exercise, is presented. students are given seven different implementations of an operator to insert an item into an ordered list. After estimating the time to insert 1000 random integers into an initially empty list for each implementation, students determine the times experimentally and then answer some related questions. The exercise enables students to gain insight into several important dichotomies: linked vs. contiguous, recursive vs. iterative, and dynamic vs. static. a number of random imtegers into an initially empty ordered-list. They are also given the times, in increasing order, from running the with each of the seven program The variety of implementations. affords a good implementations for experimentation opportunity and inference-drawing. In the first part of the exercise, students estimate the execution time for running the program with each of the seven implementations. Then the students run the program and compare the results with their original estiThey are mates. also asked to draw inferences from the experiment. Finally, some related conjectures, tests and inferences are requested. The to enable into the 1.
/lp/association-for-computing-machinery/estimating-execution-times-a-laboratory-exercise-for-cs2-OYYFa6owIZ