CSC301: Data Structures II (Winter 2017/2018)
James Riely

Welcome to the course home page! Useful links are to the left. Preliminary lecture slides and reading assignments are to the right. Slides are available if a check is shown; click on the check to see the slides. Reading assigments are listed beneath the lecture title; read this material before the lecture. Lecture slides are likely to change near the time of class.
Class Links



Google group

(Mail the class) (Mail the prof)

Code examples

(Public javadoc) (Private javadoc) (Source)

Code examples ZIP

Online students



Student Services



COS226 at Princeton

Algs4 on Youtube

Algs4 at Coursera

Princeton Slides


Getting Started

Eclipse IDE Tutorial

Debugging Tutorial

More Tutorials


Java Resources

Java API

Algs4 API

IBM Intro to Java Course

Java Tutorial

MIT 6.005 [Search]

How to Think Like a Computer Scientist

(PDF) (See also here and here.)

Java for Python Programmers

(PDF) (See also here.)
Important Parts of the Java Tutorial

Java Language


Formatting Output

Formatting Numbers


More Java

Lambda expressions

(From this text)

My Java Visualizer

(included in the code for the class)

Another Java Visualizer


Princeton Java Book

(First Chapter) (Creative Assignments)

COS126 at Princeton

Classmexer API

Recursive drawing


Recursive drawing


A coding walkthrough

Interview questions

Interview questions

techiedelight leetcode adventofcode hackerrank codinggame code gamkedo teachyourselfcs gainlo

Foundations of Computer Science

A classic text.

Algorithm Visualizations

Java version

Visualizing Algorithm

Javascript Algorithm Visualizations

Sorting Visualizations

Sound of sorting

Visualizing data structures in javascript

Open DSA

(under construction)
Schaffer's textbook

Mergesort for linked lists

Algorithm Design: Parallel and Sequential

A more advanced text.
Lecture Materials
1. Trees, iteration and recursion (3.2) [01/03-08]

No class Monday, Jan 8 (Prof @VMCAI). Makeup class Friday, Jan 5 12:00pm-1:30pm in CDM 226


Slides from class

Notes: Binary Search Trees

Demo: Binary Search Trees

2. Binary Search Trees (3.2) [01/10-15]

No class Wednesday Jan 10 (Prof @POPL). Makeup class Friday, Jan 5 2:00pm-3:30pm in CDM 226

No class Monday, Jan 15. University closed for MLK day.


Slides from class

3. Symbol Tables (3.1, 3.5) [01/17-22]
4. Balanced Search Trees (3.3) [01/24-29]
5. Hash Tables (3.4) [01/31-05]
6. Midterm [02/07-12]

Midterm exam in class Monday, Feb 12, 2018


7. Undirected Graphs (4.1) [02/14-19]
8. Directed Graphs (4.2) [02/21-26]

No class Wednesday Feb 21 (Prof @NSF). Makeup class Friday, Feb 23 1:05pm-2:35pm in CDM 226

Notes: Directed Graphs

Demo: Depth First Search

Demo: Kosaraju Sharir

Demo: Topological Sort

9. String sorts (5.1) and Tries (5.2) [02/28-05]
10. Data Compression (5.5) [03/07-12]
11. Final exam [03/16]

Final exam is on Friday, Mar 16, 2018, from 1:00 PM to 3:30 PM

Contact Hours
Class Hours: Mon/Wed 3:10pm-4:40pm in CDM 226 [Section 502]
Online, Anytime [Section 410]
Office Hours: Mon/Wed 1:30pm-3:00pm in CDM 845