Topics for first midterm exam ----------------------------- Java topics ----------- - Exceptions - Generics - Type compatibility and Polymorphism - Abstract classes and Interfaces - Iterators Basics of Collections Big-O notation and algorithm analysis Data Structures and Abstract Data Types --------------------------------------- - construction of - trade-offs between - common operations and their performance Stacks and Queues - array based - linked ArrayLists LinkedLists - singly linked - doubly linked Trees including Binary and Binary Search Trees - terminology (height, depth, size, root, interior node, leaf, etc). - structure and ordering rules (recursive and procedural) - operations on (insert / find / remove) - Array implementation of binary trees - Reading from files (stacks, first child-next sibling) Recursion - rules of recursion (both fundamental and extended) - common recursive techniques - Divide & Conquer - Recursive backtracking - Dynamic programming / memoization -------------------------------------------------------------------------------- Questions you are likely to see on the exam (just without the specifics): 1. Put the following Big-O families in {increasing,decreasing} order: 2. Give the Big-O runtime complexity of the following snippets of Java code: 3. Assuming an efficient Java implementation of the data structure, give the Big-O running time for the following methods: 4. Given the Binary Tree to the right, give the order in which the nodes are visited using the following traversals: 5. What are the trade-offs between using data structure X and data structure Y to perform action A? 6. Given an initially empty {stack,queue,BST}, show the state of the data structure as the following operations occur: