CSpartB-KEY-Dec08 - Computer Science Foundation Exam...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Computer Science Foundation Exam December 19, 2008 Computer Science Section 1B Name: Solution and Grading Criteria SSN: Max Pts Type Passing Threshold Student Score Q1 10 ANL 7 Q2 10 DSN 7 Q3 10 ANL 7 Q4 10 DSN 7 Q5 10 ANL 7 Total 50 35 You must do all 5 problems in this section of the exam. Partial credit cannot be given unless all work is shown and is readable. Be complete, yet concise, and above all be neat . Do your rough work on the last page.
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 1) (10 points) Order Notation Indicate the time complexity in terms of Big-O and the appropriate variables for each of the following operations: a) Using mergesort to sort n integers. O(nlgn) b) Pushing n items on to an initially empty stack. O(n) c) Searching for an element in a sorted array of n elements O(lgn) using a binary search ( worst case) d) Searching for an element in a sorted array of n elements O(1) using a binary search ( best case ) e) Searching for an element in a sorted array of n elements O(n) using a linear search ( worst case ) f) Converting an infix expression with n symbols to a postfix O(n) expression using the standard algorithm g) Inserting n elements into an initially empty AVL tree
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

CSpartB-KEY-Dec08 - Computer Science Foundation Exam...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online