CS1121605a - Computer Science Foundation Exam December ,...

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

View Full Document Right Arrow Icon
Computer Science Foundation Exam December , 2005 Computer Science Section 1A No Calculators! Name: SSN: KEY Solutions and Grading Criteria Sco 50 re: In this section of the exam, there are four (4) problems. You must do all of them. Partial credit cannot be given unless all work is shown and is readable. Be complete, yet concise, and above all be neat .
Background image of page 1

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

View Full DocumentRight Arrow Icon
1. [ 12 pts ] Transform the following infix expression into its equivalent postfix expression using a stack. Show the contents of the stack at the indicated points 1, 2 and 3 in the infix expressions. 1 2 3 P / ( B + S T ) + M * N / C A + F Resulting Postfix Expression : P B S + T - /M N *C/ +A - F+ + ( * / / + + 1 2 3 3 points each correct stack Points taken off for wrong entries 3 points for final expression 2
Background image of page 2
2. [11 x 2 pts ] Indicate the time complexity for each of the following operations in terms of Big-O notation, assuming that efficient implementations are used. Give the worst case complexities. Following notations are being used: AINC is an array containing n integers arranged in increasing order.
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

CS1121605a - Computer Science Foundation Exam December ,...

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

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