Name: ________________________________
Honor Code Acknowledgment: ___________________
Using big-Oh notation (in terms of N) what is the number of elements in
an N-list? Justify your answer briefly.
Problem 1: Oboy (2 points)
Consider a list of integers in which the integers are stored in
non-decreasing order and in which the integer k occurs exactly
k times; these lists are called N-lists where
N is the largest integer in the list. For example, a 4-list is
(1,2,2,3,3,3,4,4,4,4) and a five list is a 4-list with (5,5,5,5,5)
appended to the end.
Problem 2: Hautbois 2 (2 points)
If all occurrences of numbers less than
Problem 3: PolyO (2 points)
A polynomial is a mathematical function such
as x^3 - 3x^2 + 2x - 4 (or, in math-enabled HTML browsers
). If this
polynomial is p(x), then p(2) = -4. Write a class declaration for
a C++ class Polynomial. This can be as minimal as you want,
but should include comments indicating what your polynomial operations
your class supports. The key is to document whatever your minimal class
does.