Q6C_sol

# Q6C_sol - Name 16.unified Introduction to Computers and...

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

Name: ________________________________ 16.unified Introduction to Computers and Programming SOLUTIONS to Examination 4/30/04 9:05am - 10:00am Prof. I. Kristina Lundqvist Spring 2004 Grading Section: Question 1 (5) Question 2 (15) Question 3 (10) Question 4 (35) Question 5 (10) Question 6 (15) Question 7 (10) Total 100 You have 55 minutes to take this examination. Do not begin until you are instructed to do so. This is a closed book examination. No external materials are permitted, including calculators or other electronic devices. All answers must be written in the examination paper. This examination consists of 7 questions and 12 pages (not including this cover page). Count the number of pages in the examination paper before beginning and immediately report any discrepancy to the invigilator. Should you need to do so, you may continue your answers on the back of pages. Do not forget to write your name on each page . 0

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Name: ________________________________ Problem 1 - Queue (5 points) Consider the circular queue of size 10, as shown in the Figure below (Start state). The circular queue contains letters A through D. Assume the following 9 operations take place in sequence 1. Insert entry E 2. Insert entry F 3. Remove one entry 4. Remove one entry 5. Insert entry G 6. Insert entry H 7. Remove one entry 8. Insert entry I 9. Insert entry J Show the contents of the circular queue after (Final state) performing all of the operations. Where are the head and tail pointers located? D C B A Head pointer Tail pointer Start state I H G F E D J Head pointer Tail pointer Final state 1
Name: ________________________________ Problem 2 – MST (15 points) Using the given graph below, what is the ‘minimum-weight spanning tree’? Which algorithm are you using? Show clearly, step by step, on the next page, how the algorithm is used. Finally, draw the resulting Minimum-weight spanning tree here below.

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

Q6C_sol - Name 16.unified Introduction to Computers and...

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

View Full Document
Ask a homework question - tutors are online