Signature ______________________
Name_________________________
Student ID _____________________
Score:
Quiz 2
CSE 21
Spring 2010
Professor Sally Mander has 25 students in her Data Structures class and 17 students in her Discrete Math class.
Assuming that there are no students who take both classes, how many students does Sally have? _____
A) 50
B) 34
C) 8
D) 42
E) 26
Assuming there are 8 students who take both classes, how many students does Sally have? _____
A) 50
B) 34
C) 8
D) 42
E) 26
Which of the following would require the use of strong induction and which would require the use of weak
induction in a proof?
A) weak induction
B) strong induction
_____ T(n) = T(n1) + T(n3)
_____ T(n) = T(n1) + T(n2)
_____ T(n) = T(n1) + 2
n
_____ T(n) = 2*T(n1)
_____ T(n) = n*T(n1)
_____ T(n) = T(n1) + 5
Define a function for P(T) that displays the nodes in PreOrder for a binary search tree T. B1 and B2 are
possible base cases. R1 and R2 are possible recursive cases. Fill in the blanks with the number associated with
an appropriate statement. Not all blanks need to be filled. If there is only one base case, only put a number in
B1. Likewise for recursive case. In any subtree, r denotes a root node, T1 denotes a left subtree, and T2 denotes
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '10
 CS
 Logic, Graph Theory, Data Structures, ___ ___ ___, Professor Sally Mander

Click to edit the document details