Link to current stuff (below). Last update: May 19. CISC 220 Latest Info

CISC 220 Data Structures, Spring, 2014

Info links and log of course activity

Some useful links:     The Syllabus       Our Data Structures Textbook.       C++ documentation
      Piazza, our class discussion forum.       The STL Documentation at SGI.       And course Sakai site: sakai.udel.edu
Lectures are recorded on the UDCapture system and available at http://udcapture.udel.edu/2014s/cisc220-010/.

This page contains a brief summary of each class topic and the associated reading and homework assignments. This page morphs frequently, being updated at least weekly. If necessary, reload page to avoid being shown a stale version from your browser cache.

  • Mon, Feb 10, 11:15am/em>

  • Wed, Feb 12, 11:15am/em>
    • More first examples: max and min, 3 algorithms for it.
    • Max and min: best possible worst case number of comparisons.
    • Estimating functions: Big O and "about".
    • Reading: ODS section 1.3.3.
    • Lecture 2 slides(pdf).

  • Fri, Feb 14, 11:15am/em>

  • ( all labs ) Fri, Feb 14
    • Set up VirtualBox with Eclipse with C++ and course code files.
    • Write, compile, and run a "Hello, world" program.

  • Mon, Feb 17, 11:15am/em>
    • ODS section 1.2 interfaces: Stack, Queue, Deque, PriorityQueue, List, USet, SSet.
    • Reading: Scan ODS chapter 1. Read and commit to memory the interfaces in section 1.2.
    • notes(html)

  • Wed, Feb 19, 11:15am/em>

  • Fri, Feb 21, 11:15am/em>
    • Continuing based on ODS section 2.1, ArrayStack.
    • Emphasis on PRIMARILY the dynamic operations add, remove, and the tool resize() for changing the array length being used.
    • Amortization analysis of the ArrayStack dynanism.
    • notes(html)

  • ( all labs ) Fri, Feb 21

  • Mon, Feb 24, 11:15am/em>
    • FastArrayStack, a tweak on ArrayStack, Reading: ODS section 2.2.
    • Review of the amortization argument.
    • From stacks to queues: ArrayDeque, Reading: ODS section 2.4.
    • Relative to ArrayStack: The one new idea in ArrayDeque is the use of clock arithmetic on array indices. The one new data member is j.

  • Wed, Feb 26, 11:15am/em>

  • Fri, Feb 28, 11:15am/em>
    • Singly linked lists, Reading: ODS section 3.1.
    • Singly linked lists brief summary.
    • Lab preview, Comparing list implementations.

  • ( all labs ) Fri, Feb 28
    • Assignment is homework 2 on Sakai

  • Mon, Mar 3, 11:15am
    • Class cancelled due to snow.

  • Wed, Mar 5, 11:15am
    • Continue with Stack and Queue interface through singly linked lists, Reading: ODS section 3.1.
    • Box and arrow diagrams for pop. Code for pop. (dequeue = pop)

  • Fri, Mar 7, 11:15am
    • Singly linked lists: Box and arrow diagrams for enqueue. Code for enqueue.
    • Walking the walk: removeLast.

  • ( all labs ) Fri, Mar 7
    • More functionality for SLList.
    • Assignment is homework 3 on Sakai.

  • Mon, Mar 10, 11:15am
    • Finding middle ground between dynamic array and linked list.
    • What are the issues? memory use and amortization.
    • A first attempt: BlockedArrayStack,
    • A better strategy: RootishArrayStack, Reading: ODS section 2.6.

  • Wed, Mar 12, 11:15am
    • Wrapup on Stack, Queue, Deque implementations:
    • Runtime considerations, spreadsheet.
    • Memory overhead considerations, formula and clicker questions page.

  • Fri, Mar 14, 11:15am
    • Hash Tables and the USet (unordered set) interface. notes. Reading: ODS chapter 5.
    • ODS Chapter 5.1, Separate Chaining, (Multiplicative hashing, 5.1.1, will be covered after midterm)

  • ( all labs ) Fri, Mar 14
    • Testing SLList implementation of List's get and set
    • Assignment is homework 4 on Sakai

  • Mon, Mar 17, 11:15am
    • The two primary organizations of Hash tables: Separate chaining (ODS 5.1) and linear probing (ODS 5.2). But 5.2.3 will be covered after midterm. Also, we go lightly on section 5.3.1.
    • ArrayUSet.h is ArrayStack with the USet functions find(x), add(x), remove(x) included. These functions are O(n) in the worst case, but work fine on very small sets, such as the chains in hash tables with separate chaining.
    • ChainedHashTable.h is a hash table implementation using ArrayUSet for the "chains".
    • udods/LinearHashTable.h is ODS' hash table implementation using Linear Probing, we have only examined it at the level of the pseudocode in these notes.
    • The hash function is 2-stage. hashCode maps from type T to int. hashFromInt maps from int to the specific index range of the current hash table, 0..length-1.
    • Some sample questions on hash tables
    • We will discuss hash functions, eg. sections 5.1.2 and 5.2.3, in depth after the midterm.

  • Wed, Mar 19, 11:15am
    • Midterm Exam

  • Fri, Mar 21, 11:15am
    • Hash functions, Reading: ODS chapter 5.3.

  • ( all labs ) Fri, Mar 21
    • Exam return, work on Captcha homework

  • Mon, Mar 24, 11:15am
    • Binary Trees, Reading: ODS chapter 6.
    • Terminology: root, internal node, external node, leaf, height, depth.
    • Traversals: Depth first, Breadth first.

  • Wed, Mar 26, 11:15am
    • Random Binary Search Trees, Reading: ODS chapter 7.1.
    • Binary Search Tree property: At every node the item in the node is larger than all items in the left subtree (if any) and is greater than all items in the right subtree (if any).

  • Fri, Mar 28, 11:15am
  • Multiplicative Hash function, Reading: ODS chapter 5.1.1.
  • Why multiply by random odd Why take the high order bits? (instead of, say, the low order bits.)
  • Binary Search Trees, find(x), add(x), remove(x) are all in O(h), where h is the height of the tree.
  • The expected height of an n-node binary search tree generated at random is O(log(n)).
  • The worst case height of an n-node binary search tree generated at random is O(n).

  • ( all labs ) Fri, Mar 28
    • Lab Activity: work on Homework 5 and/or Homework 6. No in-lab submission this week (but note that homework 6 is due today).

  • Mon, Apr 7, 11:15am
    • Priority queues, the binary heap implementation, Reading: ODS chapter 10.1.
    • notes .

  • Wed, Apr 9, 11:15am
    • Discussion of Captcha homework.
    • Finish on binary heaps. Review concepts and examine code: udods/BinaryHeap.h
    • Meldable heaps, Reading: ODS chapter 10.2.

  • Fri, Apr 11, 11:15am
    • Meldable heaps and expected time analysis.
    • SSet (dictionary): basic binary search tree implementation, fast in the average case, Reading: ODS chapter 7.1.

  • ( all labs ) Fri, Apr 11
    • Homework 7, Random BST average height.

  • Mon, Apr 14, 11:15am

  • Wed, Apr 16, 11:15am
    • Removing in Treaps, notes.
    • Treaps get us SSet ops with O(log(n)) expected time. Could we implement SSet with O(log(n)) worst case time?

  • Fri, Apr 18, 11:15am
    • SSet: 2-3-4 trees. Main Reading: Sedgewick notes, page 11-27. Additional Reading>: ODS Textbook, chapter 9.1.
    • 2-3-4 trees are fast in the worst case, awkward to implement directly, useful primarily for understanding red-black trees.

  • ( all labs ) Fri, Apr 18
    • Labs cancelled this week

  • Mon, Apr 21, 11:15am
    • SSet: Red-Black trees. Main Reading: Sedgewick notes, page 28-48.
    • Red-Black trees are fast in the worst case, avoid the multiple node types of 2-3-4 trees. A recent version, the left leaning red black tree, is also much easier to work with than previous versions of RBT.

  • Wed, Apr 23, 11:15am
    • Binary Search Trees compared: for unbalanced average time is good, for Treap expected time is good, for 2-3 tree, 2-3-4 tree, red-black tree, LLRBT (left leaning red black tree), worst case is good, where good = O(log(n)) time per operation (find, add, or remove).
    • LLRBT insertion (the add op) Main Reading: Sedgewick notes, page 28-48.

  • Fri, Apr 25, 11:15am
    • LLRBT tree deletion (the remove op). Main Reading: Sedgewick notes, page 53...

  • ( all labs ) Fri, Apr 25
    • Work on hw 9 treap get(i) if not done.
    • Work on hw 10 captcha.

  • Mon, Apr 28, 11:15am

  • Wed, Apr 30, 11:15am
    • Second Midterm Exam
    • No printed or electronic aids allowed. You may bring a one page, one sided, hand written "cheat sheet". It must be original and hand written (nothing copied, scanned, printed, typed).

  • Fri, May 2, 11:15am
    • Discussion of Captcha project.
    • b-trees: 2-3-4 trees gone wild. slides.

  • ( all labs ) Fri, Apr 25
    • Review midterm 2
    • Work on HW 10, Captcha.

  • Mon, May 5, 11:15am
    • b-trees, Reading: ODS chapter 14.

  • Wed, May 7, 11:15am

  • Fri, May 9, 11:15am
    • introspectiveSort combines quickSort, heapSort, and insertionSort.
    • Code files: Sorters.h, testSort.cpp.

  • ( all labs ) Fri, May 9
    • Lab exercise on b-tree heights.
    • work on homework 11: Exercises 14.2, 14.4, Due May 15
    • work on homework 12: sorting, Due May 15

  • Mon, May 12, 11:15am
    • Summary on sorting.
      • compiler optimizations off vs on.
      • insertion, heap, quick algorithms compared.
      • quickSort improvements to base case (n = 2, n=17 thresholds).
      • introspectiveSort: quickSort with worst case guarantee.
    • Graphs Reading: ODS chapter 12.
      • Memory representation, matrix or vector of adjacency lists (ODS 12.1).
      • Intro to breadth first traversal, notes.

  • Wed, May 14, 11:15am
    • File representation, index pairs or triples (add a weight).
    • Shortest paths in unweighted graphs, Breadth First Search.
    • notes.

  • Fri, May 16, 11:15am

  • ( all labs ) Fri, May 16
    • Work on any unfinished homework 11 or homework 12.
    • This lab is required only if your homework is not submitted.
    Link to top(links to syllabus(incl. office hours), text, etc.)

  • Mon, May 19, 11:15am
    • Dijkstra's algorithm, run time analysis, review of correctness argument.
    • Review. review notes.

  • (section 11) Final Exam: Wed, May 28, 10:30am-12:30pm in 319 Willard (our classroom).
    • No books, notes, electronic devices, except that you may use a single page crip-sheet, one sided, hand written, original (nothing machine copied, scanned, or printed).