Resources 
Staff Contact Information 


Instructor
Teaching Fellows:


Lecture Schedule 

Lecture 
Date 
Lecture Topic 
Readings ( Java = "Java in a Nutshell") 
Lecture Slides and Code Examples 
Homeworks and Tests 
Labs 
1 
T 1/19 
Overview of Course & Course Policies; Motivational Lecture: Two algorithms for searching an arrayalgorithm, implementation, analysis, and experiments 
Syllabus 


2 
R 1/21  Introduction to Java: compiled languages (Java) vs interpreted languages (Python); types, operators, and expressions.  Read Chapter 2 of At LearningJavaOnline: go through exercises for
Install Dr. Java from the Dr. Java Web Site and from the Help menu, read through the Tutorial on "Using Dr. Java, The Basics," OR look at the following YouTube video by Aaaron Stevens, one of our 111 instructors: YT If you get the message "'Dr Java.app' is damaged and cannot be opened. You should move it to the trash," go to System Preferences > Security & Privacy and change the "Allow apps" to "Anywhere." 
HW01: HTML (due W 1/27 9pm) Part A Solution: HTML 
Lab 01: HTML  
3 
T 1/26  Java statements, conditionals, and loops; break and continue; methods; arrays.  In There are lots of different kinds of statements, but for now we just need the basic ones. LearningJavaOnline: go through exercises for
YouTube videos: 10, 17,18, 25

Lecture 3: PDF BW: PDF 


4  R 1/28  Methods and parameters; Instance variables ("fields") vs local variables; Scope and lifetime of declarations.

Please read about methods in the Java text; please read about the difference between local and instance variables here: HTML For scope of declarations, take a look at this set of notes: HTML In LearningJavaOnline: go through exercises for: Functions YouTube video: 12 
Used the board!  HW02: HTML Part A Solution: HTML 
Lab 02: HTML 
5  T 2/2  Analysis of algorithms, "Big Theta" notation, experimental verification by timing analysis; Interative sorting algorithms: Selection sort, Insertion sort Complexity analysis of iterative sorts;

Here is a good Youtube tutorial on Selection Sort; Here is a good one on Insertion Sort. There are 1000's of Youtube lectures on sorting algorithms: here is a creepy visualization of Insertion Sort, and here is a downright strange visualization of Insertion sort. Here is a nice Youtube minilecture on sorting, with associated lectures on all the major sorting algorithms. 
Lecture 5: PDF B&W: PDF  
6  R 2/4  Recursive sorting: Mergesort Recursive sorting: Quicksort; Complexity analysis of recursive sorts 
Here is a good Youtube video on Mergesort, and one on Quicksort. The first video uses "Big Oh" notation O(...) instead of "Big Theta" notation, but they are basically the same. There are several versions of quicksort, with subtle differences; the one above uses the exact method I will use in class, so please look at that one! 
Lecture 6: PDF B&W: PDF  HW03: HTML Part A Solution: HTML 
Lab03: HTML 
7  T 2/9 
ObjectOriented Design; Java program structure; static vs nonstatic; breaking a program into separate files. 
Please read "Classes and Objects" and "Java File Structure" in the Java text. Look at Aaron Stevens' YouTube videos 30a, 30b, 30c. 
Used the board!  
8  R 2/11  Quicksort reviewed; Complexity Analysis of Recursive Sorts; Abstract data types; OOD and Java program structure continued. 

Used the board and Dr. Java and finish the last part of Lecture 6 (see link above). Here are examples similar to the code I demonstrated in class, for the three types of Java files: Original Program with all code in one file: StackDemoOriginal.java Now here is the same program, broken into the three kinds of files:

HW04: HTML Part A Solutions: HTML 
Lab04: HTML 
T 2/16  No class  Monday schedule  
9  R 2/18  Stack, Queues, and Priority Queues; Ring Buffers. Error handling using Exceptions. 
Read the introduction to the Wiki articles on stacks: HTML and queues: HTML Read the first half of the Wiki Article on Circular Buffers ("How it works" and look at the animated gif). Read near the end of Chapter 2 in the Java book: "The Throw Statement" and "The Try/ Catch/Finally statement. 
Lecture 9: PDF BW: PDF  HW05: HTML Part A Solutions: HTML 
Lab 05: HTML 
10  T 2/23  References and pointers; fixing a problem with array data types: array resizing; introduction to Linked Lists. 
Read the section on Reference Types (pp.7481) CAREFULLY in the Java Text. You might want to check out the classic Binky Pointer Fun video on YT, but bear in mind it is written for a different language (C or C++).  Used the board!  
11  R 2/25  Stacks and Queues with LLs. Basics of List Processing: Iterative Algorithms 
Notes on Iterative LL Algorithms Here is a very short, clear tutorial on Linked Lists: YouTube There are a number of such tutorials on YouTube, so look around a bit for others if you wish! 
Lecture 11: PDF BW: PDF  HW 06: HTML Part A Solutions: HTML 
Lab 06: HTML 
12  T 3/1  Iterative LL algorithms 
Used the board!  Last day to drop a class without a "W" on your transcript.  
13  R 3/3  Recursive algorithms on LLs  Used the board!  No HW this week! Here are some practice problems on Linked Lists: PDF 
No Lab this week!  
SPRING BREAKEAK  
14  T 3/15 
Recursive algorithms on LLs;  Used the board!  
R 3/17  Midterm Exam  Midterm Study Guide: HTML Sample Midterm: PDF Solution to Sample Midterm: PDF Notes on Recursion in Java: HTML 
HW 07: HTML

Lab 07: HTML 

15  T 3/22  Binary Trees, Binary Search Trees; Searching and Insertion in BSTs.  Lecture 15: PDF  
16  R 3/24  BSTs continued 
Please read the following WikiP article on Tree Traversals: HTML and follow the link to read about breadth first search. 
Lecture 16: Used the board!  HW 08: HTML Part A Solution: HTML 
Lab 08: HTML 
17  T 3/29  Deletion from BSTs; Recursive tree traversals; Iterative tree traversals using an explicit stack  Lecture 17: PDF BW: PDF 


18  R 3/31  23 Trees; BTrees and external data structures  Here is a good explaination of 23 Tree Insertions: YT  Lecture 18: PDF BW: PDF
Here is a good animation you can play with to verify your understanding: HTML 
HW 09: HTML Part A Solution: HTML 
Lab 09: HTML 
19  T 4/5  Array representation of binary trees; Binary Heaps, Heapsort  There are many videos about binary heaps, here is a good one: YT 
Used the board! 


20  R 4/7  The (nearly) Perfect Data Structure; Perfect Hashing, Hash Functions; Hash Tables with Separate Chaining  Used the board! 
Lab 10: HTML  
21  T 4/12  Hash Tables with Linear Probing; Performance of Hash Tables  HashTableLP.java  Used the board!  
22  R 4/14  Discussion of Homework 09  Used the board!



23  T 4/19  Game trees: adversary search; implementation issues; example TicTacToe program  Reading on AI Techniques for Game Playing: PDF  Lecture 23: PDF BW Lecture: PDF

HW 10 (Part B is group project): HTML Part A Solution: 

24  R 4/21  Alphabeta pruning and refinements to gametree search  Video on Alphabeta Pruning: YT  Lecture 24: PDF


25  T 4/26  Graphs: Basic notions, graph traversals: depth first, breadth first  Lecture 25: PDF Here is the set of slides on State Space Search (optional, not required for final exam): PDF Search for "undirected graph" on YouTube, if you want to see some lectures, there are 1000's! 
Practice Problems on Graphs: HTML 

26  R 4/28  Comments on Final Exam; Course Evaluations 


T 5/3  Final Exam from 12:30  2:30 