{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Computer Science 61B - Spring 2000 - Shewchuk - Midterm 2

# Computer Science 61B - Spring 2000 - Shewchuk - Midterm 2 -...

This preview shows pages 1–2. Sign up to view the full content.

Spring 2000 CS61B Exam II University of California at Berkeley Dept. of Electrical Engineering and Computer Sciences Computer Science Division Spring 2000 Jonathan Shewchuk CS61B: Midterm Exam II This is an open book, open notes exam. Do not open your exam until you are told to do so! Name:_____________________________ Login:_____________________________ Lab TA:___________________________ Lab day and time:____________________ Do not write in these boxes. Problem # Possible Score 1. Quickies 7 2. Data Structures 6 3. Merging Trees 4 4. Heap Insertion 8 Total 25 Name:_____________________________________________ Login: ______________________________ [Page 2] Problem 1. (7 points) Quickies. a. (1 point) What kind of tree traversal does the minimax algorithm use? ________________________ b. (1 point) What is the maximum height of an n -node binary search tree? _______________________ c. (1 point) Can the minimax algorithm with alpha-beta pruning produce a different answer than minimax without pruning? _______________ d. (2 points) In the following method, let x be the length of xArray, y be the length of yArray , and z be the length of zArray. This method's running time is theta (_________________) public void futz(int[] xArray, int[] yArray, int[] zArray) { for (int i = 0; i < xArray.length; i++) { for (int j = 0; j < zArray.length; j++) {

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.

{[ snackBarMessage ]}

### Page1 / 5

Computer Science 61B - Spring 2000 - Shewchuk - Midterm 2 -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online