CS 3100 Exam Study Guide
You will find all my more recent study questions below.
You may want to dig around in my
to see tests and study questions from several years back. (Be aware that my
style of test-writing has changed quite a bit since then.)
Chapter Five -- Recursion as a Problem-Solving Technique
- Be able to explain what backtracking and recursion are.
- Be able to understand simple grammars like those described in the
chapter. Be able to construct simple grammars.
- Understand what prefix, postfix, and infix expressions are and know
grammar rules for such expressions.
- Be able to answer questions about how to implement a recursive grammar
checker like the example grammar checkers for C identifiers, palindromes,
or prefix expressions.
- Be able to describe recursive algorithms for solving some simple
problems. Be able to identify the base case(s) and recursive step(s) in
simple recursive algorithms.
Chapter Nine -- Algorithm Efficiency and Sorting
- Understand the role of operation counts in measuring the work
done by an algorithm.
- Know the definition of the order of an algorithm -- the big-O of the
- Understand the importance of big-O analysis as a comparative measure
of growth-rate functions of algorithms. Understand the way that
common big-O rates are ordered: O(1) < O(logN) < O(N) < O(NlogN) <
O(N^2) < O(N^3) < O(2^N). (Here we use the notation b^c to denote "b
raised to the power c.")
- Know properties of growth rate functions such as O(5*N^2) + O(N) =
- Know the following sorting algorithms and be able to discuss
their orders appropriately: Selection Sort, Bubble Sort,
Insertion Sort, Mergesort, Quicksort, and Radixsort.
- Be able to discuss the improvements to quicksort discussed in
the text and in lectures.
Chapter Eight -- Class Relationships
- Be able to explain the relationship between a base class and a class
that has been derived through public inheritance.
- Understand how to implement "is-a," "has-a," and "as-a" relationships
- Understand what class templates are. Be able to recognize and use
them. Understand the advantage of using class templates.
- Know what overloaded operators are and their advantages. Know about
how the operator keyword is used when making the function
prototype for an overloaded operator.
Chapter Ten -- Trees
- Know the definitions of all the concepts in the chapter related to tree
anatomy: node, edge, parent, child, sibling, root, leaf, ancestor,
descendant, subtree, height, level, full, complete, balanced, and so
- Understand preorder, inorder, and postorder traversal. Know algorithms
for implementing these traversals on a binary tree. Given a diagram of a
tree, be able to list the keys in the nodes in any of these traversal
- Know the definition of binary search tree. Understand the
algorithms for doing search, insertion, and deletion in a binary search
tree. Given a diagram of a binary search tree, be able to draw another
diagram showing how the tree would look if a given element were inserted
or deleted by the algorithms described in our text.
- Understand how the efficiency of binary search tree operations depends on
the shape of the tree.
Chapter Eleven -- Tables and Priority Queues
- Know what the "basic operations" are that "define the ADT table" (c.f.
pp. 517-519). Understand what these operations do well enough to write
specifications for them.
- Be aware of the advantages and disadvantages of various
implementations of the ADT table. In particular if I name a
table operation, you should be able to discuss how efficient that
operation can be made in various table implementations.
- Know what the "basic operations" are that "define the ADT priority queue"
(c.f. pp. 536-537). Understand what these operations do well enough to
write specifications for them.
- Understand how to implement a priority queue using an ordered list,
binary search tree, or heap. Understand the advantages and disadvantages
of the various implementations.
- Know how to define a heap. Know how to implement a heap with the array
implementation described in the text. Understand how insertion and
deletion are performed in this implementation.
- Know how heapsort works -- how it transforms a randomly ordered array
into a heap, and how it then uses the heap deletion operation to sort the
Chapter Twelve -- Advanced Implementations of Tables
- Be able to define 2-3 tree, 2-3-4 tree, red-black tree, and AVL tree.
- Know how to conduct a search by key in any of the structures
- If I give you a sketch of a 2-3 tree or 2-3-4 tree and tell you
to insert and/or delete some keys, you should be able to
accurately sketch how the tree will look after each operation is
- Know the definition of hashing. Know the advantages and
disadvantages of hashing relative to other implementations of the
- Know what a hash function is. Know what a perfect hash function is.
Know the two properties that a good hash function must have. Know
several examples of hash functions.
- Understand the need for collision resolution. Know the definitions of
open addressing and separate chaining and understand how to implement
these forms of collision resolution.
- Understand the following terms: linear probing, primary and secondary
clustering, quadratic hashing, double hashing. Understand why it is
desirable to make the size of a hash table a prime or an integer without
any small divisors.
- Know the definition of "load factor" and know the range of load factors
that are well-supported by open addressing and separate chaining.
Chapter Thirteen -- Graphs
- Know definitions of graph-related terms such as: graph, vertex, edge,
subgraph, path, cycle, multigraph, connected graph, and directed graph.
- Know the basic operations that would be incorporated into the definition
of a graph as an ADT. Understand what these operations do well enough to
write specifications for them.
- Understand how to represent a graph and implement its operations either
with an adjacency matrix or an adjacency list. Be able to discuss the
relative efficiencies of the operations depending on how they are
- Remember and understand the algorithms for depth first search, breadth
first search, topological sorting, and finding a minimal cost spanning