ICS 46 Spring 2018
Notes and Examples

Notes and examples, from lecture and otherwise

Over the course of the quarter, I'll be providing notes and commented code examples for you, on all of the topics that we cover in the course. When we write code in lecture, you can assume that they will be turned into full-scale code examples and be posted here afterward; for other topics, I'll write up a detailed set of lecture notes. I'd like to turn these into something complete and instructive — and this process takes some time, so it's best, in general, not to expect these to be available right away, but I will generally try to have them available before the next lecture, at the latest.

Note that you are not permitted to simply copy and paste this code into your own projects, but, of course, the techniques employed may also be of general use to you in your work. These examples are intended to give you clean, well-documented examples of some of the things we cover in lecture (and possibly a few things that we don't, time permitting), so that you can be free in lecture to avoid trying to take detailed notes when we're writing code together, instead concentrating on understanding the process and the bigger-picture concepts at work.

Lecture Date(s) Description
Tu 4/3 Course Introduction
Tu 4/3
Th 4/5
Contracts and Exceptions
Th 4/5 Templates
Tu 4/10 Randomness
Tu 4/10
Th 4/12
Smart Pointers
Tu 4/17 Multidimensional Data
Tu 4/17
Th 4/19
Move Semantics
Tu 4/24 Asymptotic Analysis
Tu 4/24 Linked List Variations
Th 4/26 Stacks, Queues, and Deques
Th 4/26 Amortized Analysis
Th 4/26 Asymptotic Analysis of Recursion
Tu 5/1 General Trees
Tu 5/1
Th 5/3
Tree Traversals
Th 5/3 N-ary and Binary Trees
Tu 5/8 Binary Search Trees
Tu 5/15 AVL Trees
Tu 5/15 Skip Lists
Th 5/17 Hash Tables
Tu 5/22 Priority Queues
Tu 5/22
Th 5/24
Th 5/24 Graph Traversals
Th 5/24
Tu 5/29
Graph Connectedness
Tu 5/29 Graphs: Shortest Paths
Th 5/31 Graphs: Toplogical Ordering
Th 5/31
Tu 6/5
Comparison-Based Sorting
Th 6/7 Linear-Time Sorting

Useful C++ background

The Notes and Examples from my most recent offering of ICS 45C provide a lot of background on topics that you'll need in this course. If you feel like any of your knowledge is shaky — because some particular topic didn't sink in when you took ICS 45C, or because it's been a while and you've forgotten some of the material — you'll find those notes to be a good way to get back into the swing of things.