MCS 124 Data Structures and Algorithms
Fall 2013
Review Problems II
Review problems presented in class.
Review homework problems.
Review implementation of various data structures, including the following classes:
Node, MyLinkedList, LinkedListIterator, My
MCS 124 Data Structures and Algorithms
Fall 2013
Review Problems I
Extra Credit (20 points total)
1. Show that
(a) 2n2 log2 n + 5n 23 = (n2 log n)
(b) n log n = O(n)
(c) 2n+1 = (2n )
(d) If f (n) is (g(n) then g(n) is O(f (n).
2. Suppose you have a comput
CS 124 Data Structures and Algorithms
Fall 2013
Review Problems III
Review problems presented in class.
Review homework problems
Extra Credit (20 points total)
1. Consider adding to the set of operations supported by binary search trees the operation
succ
CS 124 Data Structures and Algorithms
Fall 2013
Assignment 12
Due Tuesday November 26
Read 6.1-6.4
Do the following exercises (62 points):
1. (16 points) Ex. 6.2
2. (7 points) Ex. 6.3 Use the heap created in Exercise 6.2(a).
3. (5 points) Why do we want t
CS 124 Data Structures and Algorithms
Fall 2013
Assignment 10
Due Thursday November 7
Read 4.4
Do the following exercises (45 points):
1. (10 points) Ex. 4.19 Show your work show your tree after each rotation.
2. (20 points) Ex. 4.26
To your test method,
CS 124 Data Structures and Algorithms
Fall 2013
Assignment 11
Due Thursday November 21
Read 5.1-5.6
Do the following exercises (42 points):
1. (20 points) Ex. 5.1
2. (7 points) Ex. 5.2
Use the next prime number after doubling size of table as the new Tabl
CS 124 Data Structures and Algorithms
Fall 2013
Assignment 9
Due Thursday October 31
Review 4.1-4.3. Read 4.6
Do the following exercises (90 points) :
For each of the programming problems 1 - 4, submit a hard copy of your .java le and
submit a complete Ec
CS 124 Data Structures and Algorithms
Fall 2013
Assignment 8
Due Thursday October 24
Read 4.2-4.3
Do the following exercises (90 points):
1. (10 points) Explain how to implement a queue using two stacks (i.e. you can only
use operations on stacks to imple
CS 124 Data Structures and Algorithms
Fall 2013
Assignment 6
Due Thursday October 10
Read 3.1 - 3.5
Do the following exercises (40 points):
For problem 1, submit a hard copy of your .java le and submit a complete Eclipse project folder
named with your nam
CS 124 Data Structures and Algorithms
Fall 2013
Assignment 7
Due Thursday October 17
Review 3.3-3.5. Read 3.6 and 3.7.
Do the following exercises (80 points):
For each programming problem, submit a hard copy of your .java le and submit a
complete Eclipse
CS 124 Data Structures and Algorithms
Fall 2013
Assignment 3
Due Thursday September 19, 2013
Review 2.1-2.4.2.
Do the following exercises (62 Points):
1. (10 points)
(a) What is the value of sum at the end of the following program fragment?
int sum = 0;
f
CS 124 Data Structures and Algorithms
Fall 2013
Assignment 5
Due Thursday October 3
Read 3.1 through 3.5
Do the following exercise (25 points):
Add a private method getNodeOfMax to the MyLinkedList class. getNodeOfMax returns a
reference to the Node<AnyTy
CS 124 Data Structures and Algorithms
Fall 2013
Assignment 4
Due Thursday September 26
Read 2.4.4-2.4.5 (skip Euclids algorithm).
Bring a list of questions to Tuesdays lab.
Do the following exercises (48 Points):
1. (8 points) Suppose that f (n) = O(n).
(
CS 124 Data Structures and Algorithms
Fall 2013
Assignment 2
Due Thursday September 12, 2013
Read 2.1-2.4.2
Do the following exercises (70 points):
1. (20 points) pg 50 Ex. 2.7(a) program fragments (1), (2), (3), and (4): for each program
fragment, give a
CS 124 Data Structures and Algorithms
Fall 2013
Assignment 1
Due Thursday September 5
Read 1.1-1.3 and handout on logarithms. Look over 1.4-1.6, 2.1-2.4.2.
Do the following exercises (67 points):
1. (5 points)
Fill in the blanks below.
a. log2 8 = 3 becau