Final Exam Review - Page 1 of 14 Final Exam Review CS 1332...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: Page 1 of 14 Final Exam Review CS 1332 December 8, 2010 Fall 2010 This list of practice problems should not be considered exhaustive. Anything covered in lecture and/or recitation is fair game. 1. Big-O Matching. Write the number corresponding to a time complexity next to each algorithm or operation. 1. O(1) 2. O(log n ) 3. O( n ) 4. O( n log n ) 5. O( n 2 ) a. ______ Bubble Sort b. ______ Heap Sort c. ______ Insertion Sort d. ______ Merge Sort e. ______ Quicksort f. ______ Radix Sort g. ______ Selection Sort h. ______ Binary Search i. ______ Linear Search j. ______ Insert into BST k. ______ Remove from BST l. ______ Insert into AVL Tree m. ______ Insert into Heap n. ______ Remove from Heap o. ______ Insert into Perfect Hash Table 2. Interfaces. Write the method signatures and return types for the methods in each interface. Some blanks may not be used. a. Comparable<E> public ________ _______________ (___________________); b. Iterable<E> public ________ _______________ (___________________); c. Iterator<E> public ________ _______________ (___________________); public ________ _______________ (___________________); public ________ _______________ (___________________); CS 1332 Final Review Fall 2010 Page 2 of 14 3. Constructor Chaining, Method Overriding. Assume each of the following three classes is in a separate file. In the space below the code, write what is displayed when the main method is executed. public class Top { public Top() { System.out.println("In Top"); myMethod(); } public void myMethod() { System.out.println("Top's myMethod"); } } public class Middle extends Top { public Middle(String string) { System.out.println("In Middle - " + string); } public void myMethod(String string) { System.out.println("Middle's myMethod"); } } public class Bottom extends Middle { public Bottom(String string) { super(string); System.out.println("In Bottom - " + string); } public void myMethod() { super.myMethod(); System.out.println("Bottom's myMethod"); } public static void main(String args) { Top middle = new Bottom("I love CS 1332!"); } }...
View Full Document

This note was uploaded on 05/23/2011 for the course COMPUTER S 1332 taught by Professor Sweat,monica during the Fall '10 term at Georgia Tech.

Page1 / 14

Final Exam Review - Page 1 of 14 Final Exam Review CS 1332...

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

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