Abstract

This paper describes a laboratory/homework exercise, appropriate for the traditional CS 2 or Data Structures & Algorithms course (CS 7) [1], that gives students practice in analyzing algorithms to determine their asymptotic running times as well as in recognizing the relationship between an algorithm's asymptotic running time and the execution time of a program implementing it. The exercise utilizes the maximum segment sum problem, which, we argue, is a good alternative to sorting, the problem that is probably most often used in exercises of this kind.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call