MIDTERM 1


SAMPLE FORMAT

Here is the sample format for the exam. Please read through the instructions and familiarize yourself with the format.

Reference Sheet

Here is the reference sheet that will be provided in the exam.

You are responsible for material covered in:

  • Lectures
  • Readings: Introduction, Lists, Exceptions, Linked Lists, Complexity, Stacks and Queues, Trees Intro, Priority Queues, Recursion
  • Homeworks: 1 through 3 (solutions posted on Learn@UW)
  • Program: 1

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
  • 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