Home | Learning Goals | Schedule | Administration | Readings | Lab/Lecture Notes | Assignments | Computing | UBC Connect |
(Assignments are available from the assignments page.)
Handouts for Everyone!
Here are some possibly-helpful notes:
Lab | Resources | Date |
---|---|---|
Labs start Monday, January 11. Check back for lab material. | ||
Lab 1: An Introduction to Programming and Compiling in C++ |
|
Jan 11 - Jan 15 |
Lab 2: Debugging an Insertion Sort program, and Analyzing C++ pointers and reference parameters |
|
Jan 18 - Jan 22 |
Lab 3: C++ Class and Linked Lists |
|
Jan 25 - Jan 29 |
Lab 4: Heaps |
|
Feb 1 - Feb 5 |
Lab 5: Binary Search Trees |
|
Feb 8 - Feb 12 |
Lab 6: Quicksort |
|
Feb 29 - Mar 4 |
Lab 7: Hashing |
|
Mar 7 - Mar 11 |
Lab 8: AVL Trees |
|
Mar 14 - Mar 18 |
Lab 9: Parallelism |
|
Mar. 21 - Mar 25 |
Note:
I typically provide source code as plain text
files for Linux/Unix systems, and they will work
fine on MacOS as well. If you have problems on
a Windows system with the entire file appearing
on one super-long line, take a look at this Wikipedia
page for an explanation and some quick ways to get
around this problem.
Section 201 (Kotthoff, MWF 10am) Handouts
Because the parallelism section of this course is not covered in your
textbooks, we are providing these
Lecture Notes on Parallelism and Concurrency
for you. We'll cover through page 32.
nmParallel.cpp
cm.cpp
reduce.cpp
permute.cpp
bSearch.cpp
pointers.cpp
fib.cpp
I will try to post my lecture slides before they are presented in class,
usually by at least the day before. However, sometimes I make changes
just before (or during!) lecture, in which case, I will update them
afterwards.
Here are the code examples from the lectures.
(A few variables names are different, but don't worry about that.)
count_matches.cpp
Timer.hpp
Timer.cpp
Makefile
Fun, historical, completely optional background reading:
Section 202 (Hu, MWF 4pm) Handouts
This is optional and will not be on the final, but it's really
cool!
Important Notes! Because the parallelism section of this
course is not covered in your textbooks, we are providing these
These are the programs I used for the Runtime Smackdown, in case you're curious. With the thrash.cpp program, if you have access to machines with both a modern processor and something Pentium 4 vintage or older, you can see what happens when you change the stride length to different values. I can't get the BASIC programs off of the Tandy 200 easily, since it only has built-in connections for a 300 baud modem, a cassette tape, and an RS-232 serial port. :-) However, I re-typed them for you.
Note: I typically provide source code as plain text files for Linux/Unix systems, and they will work fine on MacOS as well. If you have problems on a Windows system with the entire file appearing on one super-long line, take a look at this Wikipedia page for an explanation and some quick ways to get around this problem.