Week
|
Class Meetings
|
Readings & Homework
|
Handouts & Code
|
Finals 12/7–12/12
|
- 12/9: No class meeting;
Take-Home Final Exam due 2:15 pm
|
|
|
Week 15 11/30–12/4
|
- 12/4: Other graph topics;
course wrap-up
Slides [PDF]
- 12/2: Graph traversals (cont’d);
spanning trees
Slides [PDF]
- 11/30: Introduction to graphs;
graph traversals
Slides [PDF]
|
|
|
Week 14 11/23–11/24
|
- 11/27: No class meeting (Thanksgiving)
- 11/25: No class meeting (Thanksgiving)
- 11/23: Tables in the C++ STL & elsewhere (cont’d);
the rest of the course;
external data
Slides [PDF]
|
- Online Quiz 23—on
Blackboard
Before taking this quiz,
attend the 11/18 & 11/20 classes
Due 12:30 pm Mon 11/23
|
|
Week 13 11/16–11/20
|
- 11/20: Thoughts on Project 8;
Tables in the C++ STL & elsewhere
Slides [PDF]
- 11/18: Hash Tables (cont’d);
Prefix Trees
Slides [PDF]
- 11/16: Hash Tables
Slides [PDF]
|
- Project 8
Due 5 pm Tue 12/1
- Online Quiz 22—on
Blackboard
Before taking this quiz,
attend the 11/11–16 classes
Due 12:30 pm Wed 11/18
|
squarer_test.cpp [C++ source] SKELETON
Tests for class Squarer
For Project 8, Exercise B
Uses the “doctest” unit-testing framework, version 2
Requires doctest.h , squarer.h
squarer.h [C++ header]
Header for class Squarer
There is no associated source file.
For Project 8, Exercise A
countwords_test.txt [ASCII text file]
Test input file for Project 8, Exercise A
This file is also in the Git repository.
- Pictures for Online Quiz 22 [PDF]
|
Week 12 11/9–11/13
|
- 11/13: 2-3 Trees (cont’d);
other self-balancing search trees
Slides [PDF]
- 11/11: 2-3 Trees
Slides [PDF]
- 11/9: Thoughts on Project 7;
Binary Heap Algorithms (cont’d);
Heaps & Priority Queues in the C++ STL
Slides [PDF]
|
- Online Quiz 21—on
Blackboard
Before taking this quiz,
attend the 11/6 & 11/9 classes
Due 12:30 pm Wed 11/11
- Project 7
Due 5 pm Mon 11/16
|
- Pictures for Online Quiz 21 [PDF]
treesort_test.cpp [C++ source]
Test program for function template treesort
For Project 7, Exercise A
Uses the “doctest” unit-testing framework, version 2
Requires doctest.h , treesort.h
treesort.h [C++ header] SKELETON
Header for function template treesort
There is no associated source file.
pq.cpp [C++ source]
Priority Queues & custom comparisons
heap_sort.cpp [C++ source]
Heap Sort
Requires heap_algs.h
|
Week 11 11/2–11/6
|
- 11/6: Priority Queues;
Binary Heap algorithms
Slides [PDF]
- 11/4: Binary Search Trees (cont’d);
unit overview—Tables & Priority Queues;
introduction to Tables
Slides [PDF]
- 11/2: Binary Trees;
Binary Search Trees
Slides [PDF]
|
- Online Quiz 20—on
Blackboard
Before taking this quiz,
attend the 11/4 class
Due 12:30 pm Fri 11/6
- Online Quiz 19—on
Blackboard
Before taking this quiz,
attend the 11/2 class
Due 12:30 pm Wed 11/4
- Online Quiz 18—on
Blackboard
Before taking this quiz,
attend the 10/30 class
Due 12:30 pm Mon 11/2
|
|
Week 10 10/26–10/30
|
- 10/30: Thoughts on Project 6;
Queues;
unit overview—the basics of trees;
introduction to trees
Slides [PDF]
- 10/28: Stacks
Slides [PDF]
- 10/26: More on Linked Lists (cont’d);
sequences in the C++ STL
Slides [PDF]
|
- Project 6
Due 5 pm Thu 11/5
- Online Quiz 17—on
Blackboard
Before taking this quiz,
attend the 10/23–28 classes
Due 12:30 pm Fri 10/30
|
dp6_test.cpp [C++ source]
Test program for Project 6 templates
For Project 6, Exercises A, B
Uses the “doctest” unit-testing framework, version 2
Requires doctest.h , dp6.h
fibo_bf_elim.cpp [C++ source]
Computing Fibonacci numbers
Recursion eliminated, brute-force method
rpn_evaluate.cpp [C++ source]
Reverse Polish Notation expression evaluation
Example application of a Stack
use_list2.cpp [C++ source]
Singly Linked List example using smart pointers: create & find size
Based on use_list.cpp
Requires llnode2.h
llnode2.h [C++ header]
Header for struct LLNode2
Singly Linked List node using smart pointers + associated functionality
Based on llnode.h
There is no associated source file.
|
Week 9 10/19–10/23
|
- 10/23: Node-based structures;
more on Linked Lists
Slides [PDF]
- 10/21: Allocation & efficiency;
generic containers;
thoughts on Project 5
Slides [PDF]
- 10/19: Exception safety (cont’d)
Slides [PDF]
|
- Online Quiz 16—on
Blackboard
Before taking this quiz,
attend the Wed 10/21 class
Due 12:30 pm Fri 10/23
- Project 5
Due 5 pm Thu 10/29
- Online Quiz 15—on
Blackboard
Before taking this quiz,
attend the Fri 10/16 & Mon 10/19 classes
Due 12:30 pm Wed 10/21
|
tfsarray_test.cpp [C++ source]
Test program for class template TFSArray
For Project 5, Exercise A
Uses the “doctest” unit-testing framework, version 2
Requires doctest.h , tfsarray.h
|
Week 8 10/12–10/16
|
- 10/16: Exception safety
Slides [PDF]
- 10/14: Basic array implementation
Slides [PDF]
- 10/12: Where are we?;
data abstraction;
introduction to Sequences;
interface for a smart array
Slides [PDF]
|
- Online Quiz 14—on
Blackboard
Before taking this quiz,
attend the Mon 10/12 & Wed 10/14 classes
Due 12:30 pm Fri 10/16
|
fsarray.h [C++ header] INCOMPLETE
Header for class FSArray
Frightfully smart array of int
Preliminary to Project 5
fsarray.cpp [C++ source] INCOMPLETE
Source for class FSArray
Frightfully smart array of int
Preliminary to Project 5
fsarray_main.cpp [C++ source]
Check whether FSArray package compiles
Requires fsarray.h , fsarray.cpp
|
Week 7 10/5–10/9
|
- 10/9: No class meeting;
Take-Home Midterm Exam due
2 pm
5 pm
- 10/7: Non-comparison sorts;
sorting in the C++ STL
Slides [PDF]
- 10/5: Comparison sorts III (cont’d)
Slides [PDF]
|
- Online Quiz 13—on
Blackboard
Before taking this quiz,
attend the Mon 10/5 class
Due 12:30 pm Wed 10/7
- Online Quiz 12—on
Blackboard
Before taking this quiz,
attend the Fri 10/2 class
Due 12:30 pm Mon 10/5
|
|
Week 6 9/28–10/2
|
- 10/2: The limits of sorting;
comparison sorts III
Slides [PDF]
- 9/30: Asymptotic notation;
divide and conquer;
comparison sorts II
Slides [PDF]
Master Theorem Slide [PDF]
- 9/28: Thoughts on Project 4;
comparison sorts I
Slides [PDF]
|
- Online Quiz 11—on
Blackboard
Before taking this quiz,
attend the Wed 9/30 class
Due 12:30 pm Fri 10/2
- Online Quiz 10—on
Blackboard
Before taking this quiz,
attend the Mon 9/28 class
Due 12:30 pm Wed 9/30
- Project 4
Due 5 pm Tue 10/6
- Online Quiz 9—on
Blackboard
Before taking this quiz,
attend the Wed 9/23 & Fri 9/25 classes
Due 12:30 pm Mon 9/28
|
stirling.py [Python 3 source]
Compare factorial & Stirling’s approximation
iterative_merge_sort.cpp [C++ source]
Iterative Merge Sort
merge_sort.cpp [C++ source]
Merge Sort (recursive)
counthsw_test.cpp [C++ source]
Test program for function countHSW
For Project 4, Exercise A
Uses the “doctest” unit-testing framework, version 2
Requires doctest.h , counthsw.h ,
counthsw.cpp
insertion_sort.cpp [C++ source]
Insertion Sort
bubble_sort.cpp [C++ source]
Bubble Sort
|
Week 5 9/21–9/25
|
- 9/25: Analysis of algorithms;
introduction to sorting
Slides [PDF]
- 9/23: recursive backtracking;
unit overview—algorithmic effiency & sorting
Slides [PDF]
- 9/21: Search algorithms II;
eliminating recursion;
search in the C++ STL
Slides [PDF]
|
- Online Quiz 8—on
Blackboard
Before taking this quiz,
attend the Fri 9/18 & Mon 9/21 classes
Due 12:30 pm Wed 9/23
|
important.py [Python 3 source]
Print the sum from Analysis of Algorithms
Illustrates the most important part of a formula
nqueencount.cpp [C++ source]
Count solutions to the n-Queens problem
Example of Recursive Backtracking
nqueen.cpp [C++ source]
Print solutions to the n-Queens problem
Example of Recursive Backtracking
binsearch4.cpp [C++ source]
Binary Search
Implementation #4: iterative (tail recursion eliminated)
binsearch3.cpp [C++ source]
Binary Search
Implementation #3: tail-recursive
seqsearch_compare.cpp [C++ source]
Compare Sequential Search with Binary Search
Uses Binary Search implementation from binsearch2.cpp
|
Week 4 9/14–9/18
|
- 9/18: Recursion vs. iteration
Slides [PDF]
- 9/16: Search algorithms I
Slides [PDF]
- 9/14: Software engineering concepts: abstraction;
a little about Linked Lists;
unit overview—recursion & searching;
introduction to recursion
Slides [PDF]
|
- Project 3
Due 5 pm Thu 9/24
- Online Quiz 7—on
Blackboard
Before taking this quiz,
attend the Wed 9/16 class
Due 12:30 pm Fri 9/18
- Online Quiz 6—on
Blackboard
Before taking this quiz,
attend the Fri 9/11 & Mon 9/14 classes
Due 12:30 pm Wed 9/16
|
fibo_fast.py [Python 3 source]
Computing Fibonacci numbers
Fast method
fibo_formula.cpp [C++ source]
Computing Fibonacci numbers
Formula implementation
fibo_dp_topdown.cpp [C++ source]
Computing Fibonacci numbers
Recursive top-down dynamic programming implementation
A.k.a. memoizing
fibo_recurse.cpp [C++ source]
Computing Fibonacci numbers
Fast recursive implementaton
fibo_iterate.cpp [C++ source]
Computing Fibonacci numbers
Iterative implementaton
dp3_test.cpp [C++ source]
Test program for Project 3 functions & templates
For Project 3, Exercises A, B, C, D
Uses the “doctest” unit-testing framework, version 2
Requires doctest.h , dp3.h ,
dp3.cpp
dp3.h [C++ header] SKELETON
Header for Project 3 functions
For Project 3, Exercises A–D
dp3.cpp [C++ source] SKELETON
Source for Project 3 functions
For Project 3, Exercises A–D
binsearch2.cpp [C++ source]
Binary Search
Implementation #2: recursive (improved)
binsearch1.cpp [C++ source]
Binary Search
Implementation #1: recursive
fibo_first.cpp [C++ source]
Computing Fibonacci numbers
First attempt: slow recursive implementation
use_list.cpp [C++ source]
Singly Linked List example: create & find size
Requires llnode.h
llnode.h [C++ header]
Header for struct LLNode
Singly Linked List node
There is no associated source file.
|
Week 3 9/8–9/11
|
- 9/11: Error handling;
using exceptions
Slides [PDF]
- 9/9: Containers & iterators (cont’d);
invisible functions II;
thoughts on Project 2
Slides [PDF]
- 9/7: No class meeting (Labor Day)
|
|
allocate2_raii.cpp [C++ source]
Out-of-memory handling using exceptions, with RAII classes
allocate2.cpp [C++ source]
Out-of-memory handling using exceptions
except.cpp [C++ source]
Demo of throwing & catching exceptions
iterators.cpp [C++ source]
Iterator & STL demo
msarray_test.cpp [C++ source]
Test program for class template MSArray
For Project 2, Exercise A
Uses the “doctest” unit-testing framework, version 2
Requires doctest.h , msarray.h
|
Week 2 8/31–9/4
|
- 9/4: Managing resources in a class (cont’d);
containers & iterators
Slides [PDF]
- 9/2: Software engineering concepts: testing;
integer types;
managing resources in a class
Slides [PDF]
- 8/31: Software engineering concepts: invariants;
simple class example (cont’d);
thoughts on Project 1
Slides [PDF]
|
- Online Quiz 3—on
Blackboard
Before taking this quiz,
attend the Mon 8/31 & Wed 9/2 classes
Due 12:30 pm Fri 9/4
- Project 1
Due 5 pm Tue 9/8
|
intarray.h [C++ header]
Header for class IntArray
Simple RAII class class holding dynamic array of int
There is no associated source file.
intarray_main.cpp [C++ source]
Simple main program for class IntArray
Requires intarray.h
setmember.cpp [C++ source]
See how class members are initialized
productorder_test.cpp [C++ source]
Test program for class ProductOrder
For Project 1, Exercise A
Uses the “doctest” unit-testing framework, version 2
Requires doctest.h , productorder.h ,
productorder.cpp
- Coding Standards
|
Week 1 8/24–8/28
|
- 8/28: Invisible functions I (cont’d);
simple class example
Slides [PDF]
- 8/26: Operator overloading;
parameter passing II;
invisible functions I
Slides [PDF]
- 8/24: Course overview;
unit overview—advanced C++ & software engineering concepts;
expressions;
parameter passing I
Slides [PDF]
|
|
timeofday.h [C++ header]
Header for class TimeOfDay
Time of day: hours, minutes, seconds
timeofday.cpp [C++ source]
Source for class TimeOfDay
Time of day: hours, minutes, seconds
timeofday_main.cpp [C++ source]
Simple main program for class TimeOfDay
Requires timeofday.h /.cpp
invisible.cpp [C++ source]
Demo of invisible functions
- Semester Plan
Updated Mon 11/9
- Syllabus
|