Computer Science 1026A/B Final: CS1027FinalApril07Master.doc

259 views12 pages
terubarenuka and 39895 others unlocked
COMPSCI 1026A/B Full Course Notes
26
COMPSCI 1026A/B Full Course Notes
Verified Note
26 documents

Document Summary

Questions from the computer science 027b final exam april 2007. With solutions: this is not the entire 3-hour exam, since there were topics on the exam that are not, the marks for each individual question are given. Allow approximately 1 minute per relevant this term. mark on average. Note that the stackadt, queueadt, iterator, listadt, unorderedlistadt, orderedlistadt, Binarytreeadt and binarysearchtreeadt interfaces were provided at the back of the exam paper, as well as the code for linearnode. java and binarytreenode. java. 1. (9 marks) for each of the following, give the time complexity using big-o notation. Assume an input of size n in each case. a) for ( int i = n; i > 0 ; i-- ) { for ( int j = 1; j < n; j ++ ) System. out. println(j, i); for ( int k = n; k > 1; k = k - 2) Answer: ______o(n log n) for (int k = 1; k < n; k++)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Questions