CSC 225 Final: CSC 225 Fall 2010 Final Exam

36 views11 pages

Document Summary

Csc 225 - algorithms and data structures: i. Students must count the number of pages in this examination paper before begin- ning to write, and report any discrepancy immediately to the invigilator. This exam has ten pages (the last page is blank in case you need extra space) plus the header page. Use only space provided on exam for answering questions. Circle true or false for each question and justify your answer. No marks will be given unless there is a correct justi cation. [3 marks] for a xed integer k, the sum s(n) = Ik is in o(nk ). i = 1 (b) [3 marks] a search for a data item in a binary search tree can take (n) time in the worst case. [3 marks] it takes at least o(n log2 n) time in the worst case to build a heap because both bubble up and bubble down take (log2 n) time in the worst case.