## Exam Information

Login / Sign Up to View Document

## Sample Document Text

Midterm Exam, CMSC 420, Fall 2002 Name:
Instructions:
. Leave at least one empty seat between you and each of the other students.
. This exam is open book, open notes (and closed neighbor :-)
. Each question is worth 5 points, for a total of 100 points.
. If you want any partial credit for wrong answers, you need to show your work.
. Write only on the test sheets. If you run out of room, write on the back of the last page.
Problem 1. Professor Prune has created an algorithm that does some kind of computation on
an array. If the algorithm is called on an array of size n, then the number of comparison operations
done by the algorithm will vary depending on which array of size n, but it will always be a number
in the interval from 2n2 ?n to n3 + 2n?1, inclusive.
1. Let Cbest(n) and Cworst(n) be the worst-case and best-case values for the number of compar-
isons done by the algorithm. Below, circle each true statement:
Cbest(n) = O(n2) Cbest(n) = ?(n2) Cbest(n) = ?(n2)
Cbest(n) = O(n2 lgn) Cbest(n) ...

## Related Documents

Manipulation Exam

© Copyright 2020 , Koofers, Inc. All rights reserved.

The information provided on this site is protected by U.S. and International copyright law, and other applicable intellectual property laws, including laws covering data access and data compilations. This information is provided exclusively for the personal and academic use of students, instructors and other university personnel. Use of this information for any commercial purpose, or by any commercial entity, is expressly prohibited. This information may not, under any circumstances, be copied, modified, reused, or incorporated into any derivative works or compilations, without the prior written approval of Koofers, Inc.