CPSC 112 Final: CS 112 Yale 12su Final Solution
Document Summary
Cis 110 summer 2012 final exam, 28 june 2012, answer key: (1 points) Miscellaneous (a) write your name, recitation number, and pennkey (username) on the front of the exam. (b) sign the certi cation that you comply with the penn academic integrity code. You may use any notation you like as long as it is clear that you understand the answer. The best case is o(n) for a sorted array and the worst case is o(n2) for an array in reverse order. Linked lists can grow or shrink at will. Array have random access and use less memory than linked lists for the same number of elements. (d) give two reasons why we might want to use an interface. It allows methods that rely only on the ability to compare elements, such as sorting and searching, to work on object of any class where it is meaningful to compare elements, including user-de ned classes.