CS 2110 Final: CS 211 Cornell 2006 Fall Final Examsfinalcs211sp05

16 views13 pages
31 Jan 2019
Course
Professor

Document Summary

There are 15 questions on 12 numbered pages. Check now that you have all the pages. Use the back of the pages for workspace. The exam is closed book and closed notes. Page 2 of 12: (4 points) check the adt or data structure that is most appropriate for each of the following problems: (a) you want to build an address book with entries in alphabetical order by last name. Priority queue (c) you want to build a table of contents for a textbook. The textbook consists of chapters, chapters consist of sections, and sections consist of subsections. Balanced tree (d) you want to build an email address miner that scans a hard drive looking for email addresses, then sends them to a remote host. Assuming addition and multiplication are o(1) operations, what is the worst-case asymptotic complexity of computing xn this way: (7 points) prove that for odd n 1, n.