Midterm Exam 1:
You are responsible for material covered in:
A selection of sample exam questions is available on
Learn@UW
in the "Content" section of the course.
Topics
- General
abstract data type (ADT), data structure, Java interfaces (defining, implementing, using an interface as a type), using Java generics, primitive vs. reference types in Java
- Lists (Arrays)
List ADT, List operations, implementing List using an array, implementing List using a linked list (i.e., a chain of linked nodes), complexities of List operations for different implementations, using a List
- Iterators
what they are, how to use them, how to implement one for an ADT when the underlying data structure is an array or a chain of linked nodes
- Java Exceptions
defining new exceptions, checked vs. unchecked, throwing an exceptions using throw, handling an exception using try-catch, handling an exception by passing it down the call stack, listing exceptions in a throws clause
- Linked Lists (Chains of Nodes)
list node, linked list operations, head pointer, tail pointer, header node, singly linked lists, doubly linked lists, circular linked lists, comparison of linked list variations
- Complexity
what complexity is, problem size, constant time (O(1)), linear time (O(N)), quadratic time (O(N2)), big-O notation, worst-case vs. best/average cases, determining complexity of Java code, limitations of complexity analysis
- Stacks
Stack ADT, Stack operations, implementing Stack using an array, implementing Stack using linked list variations, complexities of Stack operations for different implementations, using a Stack
- Queues
Queue ADT, Queue operations, implementing Queue using array variations, circular arrays, implementing Queue using linked list variations, complexities of Queue operations for different implementations, using a Queue
Midterm Exam 2:
You are responsible for material covered in:
- Lectures
- Readings: Recursion, Searching, Trees, Binary Search Trees, Red-Black Trees, Priority Queues
- Homeworks: 5 through 8 (homework solutions are on Learn@UW)
- Programs: 2 and 3
A selection of sample exam questions is available on
Learn@UW
in the "Content" section of the course.
Topics
- Priority queues
Priority Queue ADT, implementing Priority Queue (using a heap, BST, unsorted array, sorted linked list, etc.) and implications for complexities, heap operations (algorithms & complexities), array implementation of heaps
- Recursion
recursive methods, base case, recursion rules, how method calls work (i.e., activation records and the call stack), recursion vs. iteration, recursive data structures, analyzing complexity of recursive methods, recurrence equations, determining complexity using recurrence relations
- Search
Java interfaces (defining, implementing, using an interface as a type), the Comparable interface, sequential search, binary search, complexities of search algorithms
- Trees
position-oriented vs. value-oriented ADTs, tree terminology (root, leaf, node, edge, parent, child, sibling, ancestor, descendant, subtree, path, length of a path, height of a tree, full tree, complete tree, height-balanced tree), general trees, binary trees, implementation of trees, writing recursive methods that traverse a tree, pre-order traversal, post-order traversal, level-order traversal, in-order traversal
- Binary Search Trees
binary search trees (BSTs), key value, implementing BSTs, algorithms for BST operations (print, lookup, insert, delete), in-order successor, in-order predecessor, complexities of BST operations
- Red-Black Trees
balanced search trees, red-black trees, red-black tree properties, root property, red property, black property, algorithms for red-black tree operations (print, lookup, insert)
Final Exam:
You are responsible for material covered in:
A selection of sample exam questions is available on
Learn@UW
in the "Content" section of the course.
Topics List:
- Midterm exam 1 and Midterm exam 2 topics
The final is cumulative although there will be somewhat more emphasis on the topics covered since midterm 2.
- Graphs
graph terminology: node, vertex, edge, directed, undirected, source, target, adjacent, successor, predecessor, degree, in-degree, out-degree, path; classifying different kinds of graphs: cyclic, acyclic, complete, connected, weakly-/strongly-connected, connected component, weighted, DAG; graph ADT (implementations & complexities), representing edges: adjacency lists, adjacency matrix; graph traversals (BFS & DFS), spanning trees, finding paths & cycles, Dijkstra's algorithm, topological ordering
- Hashing
hashing terminology: key, hash function, hash code/index, hash table, load factor, collision, ideal hashing; hash table operations (algorithms & complexities); choosing table size; defining a good hash function, hashing techniques: mod by table size, folding, extraction, weighting, handling non-integer keys; collision handling strategies: open addressing (linear & quadratic probing, double hashing) and buckets (using different data structures)
- Sorting
comparison sorts: (algorithms & complexities - time & space, best & worst case circumstances) including bubble sort, insertion sort, selection sort, merge sort, quick sort, heap sort; stable sort, radix sort