CS 1321 (Principles of Algorithm Design I):
Review for Final Exam
Format of the exam
(Everything in this section is the same
as for the previous two exams, except for the length
and date of the exam.)
The exam will be during the scheduled final-exam period.
It will be approximately twice the length of one of
the previous exams, but you will have the full three hours
to complete it.
You may use your textbook and any notes or papers you care to bring,
but you may not use other books, a calculator or computer,
or each other's papers.
The following are some kinds of questions that might be on the exam.
It is
not necessarily an exhaustive list
of all types of questions on
the exam, but should give you an idea of what to expect.
- Given some C++ code (possibly a complete program, possibly
a fragment), answer one or more of the following questions:
- Will it compile correctly? (You may be told that it
does not.) If not, why not, and how would you fix it?
- What does it print out? What does it (if a function)
return? What value does it assign to a specified
variable? Are these results correct? If not,
what has gone wrong, and how would you fix it?
- Given a problem description, write a C++ program or function
to solve it. You may be given some of the code and asked
to "fill in the blanks", or you may be given descriptions
of C++ functions or classes to use in your solution.
Topics to review
You are responsible for all material covered in class or in the
assigned reading.
(See Homeworks and other assignments
for a list of assigned reading.)
You should review in particular the following
topics. Again, this list is
not necessarily exhaustive, but should
give you an idea of what topics I consider most significant.
You should also look again
at the review sheets for
Exam #1 and
Exam #2.
- Basic data structures -- implementing them (possibly
in terms of other data structures) and using them
to solve problems:
- Linked lists.
- Deques.
- Stacks.
- Trees.
- Hash tables.
- Pointers and dynamic memory.
- Templates.
- Recursion, especially working with recursive data
structures.
- Defining classes.
- Defining iterators.
I also recommend reviewing the homeworks assigned since
the last exam (#6, #7, #8, and #9).