October 21, 2009
Name _
EECS 311 Data Structures Midterm Exam
Dont Panic!
1. (10 pts) In the boxes below, show the red-black trees that result from the successive addition of the given values. Use doubled-lines for red links. Clearly indicate recoloring a
October 21, 2009
Name _
EECS 311 Data Structures Midterm Exam
Dont Panic!
1. (10 pts) In the boxes below, show the red-black trees that result from the successive addition of the given values. Use doubled-lines for red links. Clearly indicate recoloring a
EECS 311: Data Structures and Data Management Homework 5
Assigned: 10/21/10
Due: 10/28/10
For this week only, there will be no late penalty for homeworks turned in by Monday, 5pm at the
start of the TA section. After this deadline, late homeworks will not
EECS 311: Data Structures and Data Management Homework 4
Assigned: 10/14/08
Due: 10/21/08
1
Reading.
Read the supplemental splay tree handout. (If you didnt get one in class, you can nd it on
Blackboard.)
2
Problems.
1. Show the trees that result from ins
EECS 311: Data Structures and Data Management Homework 3
Assigned: 10/7/08
Due: 10/14/08
1
Reading.
Chapter 4, Sections 1-4.
2
Problems.
1. Calculate the minimum and maximum number of nodes in a binary tree of height h. Explain
the scenarios that give the
EECS 311: Data Structures and Data Management Homework 2
Assigned: 9/30/10
Due: 10/7/10
1
Reading.
Chapter 3.
2
Problems.
1. Prove that, for any constant c, if we resize an array based data structure from capacity n to
capacity n + c whenever it is full t
EECS 311: Data Structures and Data Management Homework 1
Assigned: 9/23/10
Due: 9/30/10
1
Reading.
Chapters 1-2.
2
Book Problems.
1.5 (write function in Java or C+, you do not have to write a full program),
1.8 (parts a and b), and
2.2 (for each part e
EECS 311: Data Structures and Data Management
Sample Midterm Questions
Advice: Skip problems that might take a while and come back to them later. If an algorithm is
requested, be as succinct as possible, write your algorithms in pseodocode. You do not nee
EECS 311: Data Structures and Data Management Sample Final
Name:
Fall 2010
Advice: Skip problems that might take a while and come back to them later. If an algorithm
is requested, be as succinct as possible, write your algorithms in pseodocode (unless oth
EECS 311: Data Structures and Data Management
Program 2
Assigned: 11/16/10
Checkpoint: 11/23/10; Due: 12/03/10
1
Project: Scheme Calculator.
In your last programming assignment you wrote a parser that reads in scheme data types. Scheme
data types and sche
EECS 311: Data Structures and Data Management
Program 1
Assigned: 10/21/10
Checkpoint: 11/2/10; Due: 11/9/10
1
Project: Scheme Parser.
In many respects, the ultimate program is an interpreter. Why? Because given the right input
(i.e., program) it can do a
EECS 311: Data Structures and Data Management
Program 1
Assigned: 10/21/10
Checkpoint: 11/2/10; Due: 11/9/10
1
Project: Scheme Parser.
In many respects, the ultimate program is an interpreter. Why? Because given the right input
(i.e., program) it can do a
EECS 311: Data Structures and Data Management Homework 8
Assigned: 11/18/10
Due: 11/30/10
1
Reading.
Chapter 8.
2
Problems.
1. Problem 6.31. Hint: rst show that
k
d
+
k
d1
=
k+1
d
then use induction.
2. In class we discussed the union-nd algorithm and arg
EECS 311: Data Structures and Data Management Homework 7
Assigned: 11/11/10
Due: 11/18/10
1
Reading.
Chapter 6 (except 6.56.7)
2
Problems.
1. In class we discussed a linear-time algorithm, build-heap, for building a binary heap from an
unordered array. Yo
EECS 311: Data Structures and Data Management Homework 6
Assigned: 11/04/10
Due: 11/11/10
1
Reading.
Chapter 9, Sections 03.2.
2
Problems.
1. Give an algorithm to determine whether an undirected graph contains an odd-length cycle.
An odd-length cycle is o