CS 2 (Winter 2025)

Welcome to CS 2! We’re super excited to have you here this term!

Most Recent Announcements

Due Next

Office Hours Status

Calendar

Wellness and Inclusion

It is very important to us that you succeed in CS 2. We provide many extra resources to help you. Prof. Blank and the TAs hold many office hours!

It is also very important to us that you maintain your mental wellness throughout the course. A few points are not worth losing sleep over. Everyone on the course staff is available to chat, and you can always attend office hours for a non-academic conversation if necessary. You can also visit the counseling center if you find you need help beyond the course staff. If you have a temporary health condition or permanent disability (either mental health or physical health related), you should contact accessibility services if you have not already. Additionally, if there is something we can do to make your experience better, please let us know.

Diversity, inclusion, and belonging are all core values of this course. All participants in this course must be treated with respect by other members of the community in accordance with the honor code. If you feel unwelcome or unsafe in any way, no matter how minor, we encourage you to talk to Prof. Blank or one of the Deans. We view these sorts of honor code violations as completely unacceptable, and we take them very seriously.

Tools

Project Registration Extension Requests

Course Staff

Instructors

they/them
Book an appointment!
Annenberg 115
blank@caltech.edu
(626) 395-1765

Teaching Assistants

Hopper
she/her
hopper@
Vansh Tibrewal
he/him
vtibrewa@
Aiden Di Carlo
he/him
adicarlo@
Ellie Chen
she/her
echen2@
Jinhuang (Jin) Zhou
he/him
jzhou2@
Maya Keys
she/her
mekeys@
Max Chen
he/him
mfchen@
Pratyush Singh
he/him
pksingh@
Ritali Jain
she/her
rjain@
Robert Reiden Walker
he/they
rrwalker@
Ryan Lin
he/him
rylin@
Sani Deshmukh
she/her
sadeshmu@

Handouts

The following is a list of handouts that you might find helpful throughout the course. We’ve categorized them by when they are useful.

Course

Syllabus – an overview of the course and administrative information

Pair Programming – introduction to pair programming

Collaboration Policy – the course collaboration policy

Week 0

Java/Python Comparison – a comparison of the basic syntax of Python with Java

Software Setup – instructions on how to get Java, IntelliJ, and git for the course

Schedule

L00 Mon, Jan 06 Introduction and OOP [ materials ]
Course administrivia. Designing Java classes. Designing data structures. Object oriented programming.
L01 Mon, Jan 13 Problem Decomposition [ materials ]
Using an API. Helper methods. Quadgrams. Log likelihoods. Java String API. Reading documentation.
L02 Wed, Jan 15 Java Practice!
Practice…writing code in Java.
DUE Thu, Jan 16
11:30 pm
lab01 (explosive-debugging) [ guide ]
Debugging JUnit tests. Prints. The IntelliJ debugger. Breakpoints.
L03 Fri, Jan 17 Basic Data Structure Trade-Offs [ materials ]
Lists. Sets. Maps. Nested data structures. Efficiency.
DUE Mon, Jan 20
11:30 pm
project01 (ciphers) [ guide ]
This project helps us transition fully over to Java.
L04 Wed, Jan 22 Stacks and Queues
How do we characterize data structures? Client usage of stacks and queues.
DUE Thu, Jan 23
11:30 pm
lab02 (restaurants) [ guide ]
Maps and Lists. Data structure trade-offs.
L05 Fri, Jan 24 Regular Expressions
Strings, parsing, and regular expressions.
L06 Mon, Jan 27 The Power of Recursion
RECURSION
DUE Mon, Jan 27
11:30 pm
project02 (hangman) [ guide ]
This project focuses on using the built-in Java collections as a client.
DUE Tue, Jan 28
11:30 pm
quiz01
L07 Wed, Jan 29 Recursive Backtracking
The recursive backtracking pattern.
L08 Fri, Jan 31 Implementation: ArrayIntList
Arrays. Implementing an ArrayList. Designing a class to fit an API.
L09 Mon, Feb 03 Generics and Implementation: ArrayList
Generics. Java types. Interfaces.
L10 Wed, Feb 05 Iterators and Implementation: SimpleArraySet, SimpleSortedArraySet
Iterators. Implementing a set. Data structure trade-offs.
DUE Thu, Feb 06
11:30 pm
lab04 (anagrams) [ guide ]
Recursive backtracking.
L11 Fri, Feb 07 Stacks and Queues Implementation: LinkedList
Collections. Stacks. Queues. Nodes. Implementing a linked list.
L12 Mon, Feb 10 More LinkedLists
More linked list shenanigans
DUE Mon, Feb 10
11:30 pm
project03 (html fixer) [ guide ]
This project focuses on algorithmic efficiency and using stacks and queues.
L13 Wed, Feb 12 Trees and BSTs
The tree data structure. Binary search trees.
L14 Fri, Feb 14 Tries
The trie data structure.
DUE Mon, Feb 17
11:30 pm
project04 (synthesizer)
This project focuses on building our own data structures for the first time.
L15 Wed, Feb 19 Hash Tables I
The hashtable data structure.
DUE Thu, Feb 20
11:30 pm
lab05 (memoization)
Memoization. Recurrence Relations.
L16 Fri, Feb 21 Hash Tables II
More hashtables. Collision resolution. Rehashing.
L17 Mon, Feb 24 Asymptotic Analysis I: Big-Theta
DUE Tue, Feb 25
11:30 pm
quiz02
L18 Wed, Feb 26 Asymptotic Analysis II: Recurrences
L19 Fri, Feb 28 Graphs I: Representation
L20 Mon, Mar 03 Graphs II: DAGs
L21 Wed, Mar 05 Heaps & Priority Queues I
The heap data structure.
DUE Thu, Mar 06
11:30 pm
lab06 (mazes)
Solving mazes. DFS.
L22 Fri, Mar 07 Graphs III: Single-Source Shortest Paths
L23 Mon, Mar 10 A Case Study: Union-Find
DUE Mon, Mar 10
11:30 pm
project06 (markov)
This project focuses on implementing the hash table and BST data structures.
L24 Wed, Mar 12 Victory Lap
DUE Thu, Mar 13
11:30 pm
lab07 (graphs)
Traversing graphs. Social networks.
DUE Wed, Mar 19
11:30 pm
project07 (beavermaps)
This project focuses on building and using a graph data structure.
DUE Mon, Mar 24
11:30 pm
project05 (movies)
This project focuses on implementing the trie data structure, and creating an extensible API.