# midterm - Exam 1 Name Account Instructions Write your name...

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

Exam 1 Name: Account: Instructions Write your name and account on all sheets. Solve two problems out of A1, A2, A3, and two problems out of B1, B2, B3. Each problem is worth 10 points. All parts of a problem are worth equal amount. If you do not follow the directions and solve all the three problems A1, A2, and A3, you will get credit only for A1 and A2. Similarly, if you solve all the three problems B1, B2, and B3, you will get credit only for B1 and B2. When writing pseudocode for the problems in part B, you may associate additional information not contained within the object’s class with an object, but you must comment any additional data structures used at the top of your procedure. For example, to associate a color with a regular binary tree node: Algorithm myAlg(. ..): Input : ... Output Additional Data Structures : node .color stores a color value for a binary tree node { do some stuﬀ here } current . color red { do some other stuﬀ here } currcolor current . color { do more stuﬀ here } Write your solution on the same sheet as the problem (use the back side if necessary).

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 / 7

midterm - Exam 1 Name Account Instructions Write your name...

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

View Full Document
Ask a homework question - tutors are online