This page summarizes the lectures and mentions the suggested reading assignments.
This summary is quite brief, and its intention is to help the student and
instructor recollect what was covered. It is no substitute for participating
in the lectures.
Week 1
- Lecture 1: An introduction to a program in Java, and how to create
a java application project in the netBeans IDE via the
hello world program. A discussion
of primitive types.
- Lecture 2: packages, classes, instance variables and methods, static methods, and
objects, and the syntactic structure of a program in Java via
this program.
- Lecture 3: Array declaration, creation, arrays are objects idea, syntax of for, while,
and if-else constructs, instantiation of inputs to method calls via
this program. Also a very brief discussion of
reading input from the standard input, from Section 1.6 of the text.
- Reading assignment for Week 1: First chapter of textbook.
Week 2
- Lecture 1: An introduction to inheritence and polymorphism via
this program.
- Lecture 2: We continue on inheritence and polymorphism via an example that is basically from Section 2.2
of the text.
- Lecture 3: Completion of the previous example.
- Reading assignment for Week 2: We covered the concepts from Section 2.2 in
class and from Section 2.3 in the discussion section. For readings, an overview
of Section 2.1, followed by a thorough understanding of 2.2 and 2.3 is
recommended.
Week 3
- Lecture 1: Designing a class for
storing a text document. Note that the class is under development
and will be modified as we go along.
- Lecture 2: Continuing on the same exaple.
- Reading assignment for Week 3: A different example that covers some of
the same ideas as our example is Section 3.1.1 of the text. Studying
this is recommened.
Week 4
- Lecture 1: An introduction to linked lists, based on Section 3.2 of
the text. Overview of Homework 3.
- Lecture 2: Writing a class for a
singly linked list.
- Lecture 3: Completing the discussion of a singly linked list class;
a brief discussion of how one problem in the homework should use doubly
linked lists.
- Reading assignment for Week 4: Sections 3.2 and 3.3 of the text.
Week 5
- Lecture 1: An introduction to recursion based on Section 3.5.
- Lecture 2: First Midterm
- Lecture 3: Recursion: thinking about recursive programs and their
correctness, and approaching problem solving recursively. (Section 3.5)
- Reading assignment for Week 5: Sections 3.5.
Week 6
- Lecture 1: We'll introduce the idea of primitive operations and running
time analysis by looking at this Multiset
Class .
- Lecture 2: The big-Oh notation and definitions, the seven functions from Section 4.1,
an idea for implementing the MultiSet class so that updates take O(n) time,
but checking containment takes O(log n) time. To anticipate some highlights
from later in the course, we ask if there is an implementation where updates
and containment take O(log n) time.
- Lecture 3: Some more examples of running time analysis and corresponding design
questions from Section 4.2: computing prefix averages, and testing uniqueness
of arrays.
- Reading assignment for Week 6: Sections 4.1 and 4.2. The focus should
be on 4.2, and 4.1 is supplemental.
Week 7
- Lecture 1: We finish the uniqueness testing from last week. We start on Chapter
5 (stacks and queues), with a discussion of the stack abstract data type (ADT),
and its expression as an interface in Java.
- Lecture 2: The Stack interface, and a class that implements it using an
array to record the stack. The Stack
interface says that the push method should take as input any object, and the
pop method should return an object.
- Lecture 3: We make both the Stack interface and the implementing class
generic, to obtain the end result in Sections 5.1.1 and 5.1.2.
- Reading assignment for Week 7: Sections 2.4, 2.5, and 5.1.
Week 8
- Lecture 1: An implementation of the stack class using a generic linked
list, as described in Section 5.1.3. We'll also start on the Queue ADT.
- Lecture 2: Queue implementations using arrays and singly linked
lists, from Section 5.2 of text.
- Lecture 3: We begin a discussion of Chapter 6. In this lecture, we
introduce the Java classes ArrayList and LinkedList, that implement
the List interface, that in turn implements the Collection interface. We consider the running time of the methods they
support. While our discussion here corresponds to Sections 6.1 and
6.4, it is based more directly on the "Notes on Lists and Iterators"
in the context link of the AAA section of the course.
- Reading assignment for Week 8: Sections 2.4, 2.5, and 5.2.
Week 9
- Lecture 1: Continuing with ArrayLists and LinkedLists, and further
examples that illustrate the running time consequences of using these. The
notion of an iterator, and how to work with it.
- Lecture 2: Second Midterm
- Lecture 3: More on ArrayLists, LinkedLists, Iterators. We'll begin
Trees (Chapter 7).
- Reading assignment for Week 9: The handout on the above stuff (see
within Content link of AAA section).
Week 10
We cover Trees from Chapter 7 of the book.
- Lecture 1: Examples of (rooted) trees, definitions of trees, notions of
root, internal and external nodes, ancestor, descendant, subtree rooted at
a particular node, paths and edges. All this is covered in Section 7.1.1.
- Lecture 2: The Tree abstract data type, and a sketch of its
implementation using a linked structure. This is covered in 7.1.2. You
will develop an actual implementation in a homework.
- Lecture 3: More discussion of the homework on trees. The height of
a tree and how to compute it. Binary trees, examples, properties, an interface for the ADT, and sketch of two implementations using a linked structure and an
arraylist, respectively. This is from Section 7.3, which also discusses
a Java implementation in detail. This is worth studying, but we won't
get into it in class. Some of this will spill over to next week.
- Reading assignment for Week 10: Chapter 7.
Week 11
We discuss the priority queue ADT and some of its realizations, from Chapter 8.
- Lecture 1: The priority queue ADT, motivations, and a preliminary discussion of its implementation using a (sorted) linked list.
- Lecture 2: Details of implementation using the LinkedList class. This
parallels the text's implementation using the NodePositionList, a class from
Section 6.2 that we didn't really talk about in the course. The code for
our implementation can be found
here.
- Lecture 3: Using a heap to implement a priority queue.
- Reading assignment for Week 11: Chapter 8. (Keep the differences, mentioned above, from the
book in view.)
Week 12
We complete discussion of priority queues, and start on Chapter 9.
- Lecture 1: Adaptable priority queues. These are discussed in Section 8.4.
- Lecture 2: Introduction to Maps and Hash Tables (Chapter 9).
- lecture 3: Implementing Hash Tables, from Section 9.2 of the book. also see slides from text within the
content link in AAA section of the course.
- Reading assignment for Week 12: Sections 9.1 and 9.2 of text.
Week 13
- Lecture 1: Wrapping up Hash Table Implementations.
- Lecture 2: Hash Tables, a detour with some analysis.
- Lecture 3: Introduction to the ordered map ADT, and its implementation using skip lists. (Sections 9.3 and 9.4. See also slides in AAA section of the course.)
- Reading assignment for Week 13: Sections 9.3 and 9.4 of the text.
Week 14
- Lecture 1: Skip lists: running time analysis of search etc.
- Lecture 2: Overview of last homework, Binary Seacrh Trees from Section 10.1.
- Lecture 3: Introduction to AVL trees from Section 10.2
- Reading assignment from Week 14: Sections 10.1 and 10.2 of text
Week 15
- Lecture 1: Restoring height balance after an insertion into an AVL tree.
- Lecture 2: Why do AVL trees have height O(log n)? Wrapping up the course,
remarks on the final.
- Lecture 3: Discuss questions about anything in the course.