Introduction to Data Structures and Algorithms
Us:
TAs: 
https://ubc-cs.github.io/cpsc221/
Info on:
| Week | Mon | M | W | F | HW/PA | Lab | EX |
|---|---|---|---|---|---|---|---|
| 1 | Sep 7 | 🎉 | 🎉 | ||||
| 2 | Sep 14 | 🎉 | 🎉 | 📹 | 🪄 | ||
| 3 | Sep 21 | 🎉 | 🎉 | 📹 | 🏎️ | 🪄 | 🤩 |
| 4 | Sep 28 | 🎉 | 📹 | 🪄 | 🤩 | ||
| 5 | Oct 5 | 🎉 | 🎉 | 📹 | 🚀 | 🪄 | 🤩 |
| 6 | Oct 12 | 📹 | 📹 | ||||
| 7 | Oct 19 | 🎉 | 🎉 | 📹 | 🏎️ | 🪄 | 🤩 |
| 8 | Oct 26 | 🎉 | 🎉 | 📹 | 🪄 | 🤩 | |
| 9 | Nov 2 | 🎉 | 🎉 | 📹 | 🚀 | 🪄 | 🤩 |
| 10 | Nov 9 | 📹 | |||||
| 11 | Nov 16 | 🎉 | 🎉 | 📹 | 🪄 | 🤩 | |
| 12 | Nov 23 | 🎉 | 🎉 | 📹 | 🚀 | 🪄 | 🤩 |
| 13 | Nov 30 | 🎉 | 🎉 | 📹 | 🏎️ | 🪄 | 🤩 |
| 14 | Dec 7 | 🎉 |
Legend: 🎉 in-person lecture 📹 async video 🪄 lab 🤩 examlet 🏎️ HW due 🚀 PA due off / nothing due
| Component | Weight | |
|---|---|---|
| 🎉 Class meetings | attendance not required | 0% |
| 🪄 Labs | best 8 of 10 × 1% | 8% |
| 🏎️ Homework | 3 × 2% | 6% |
| 🚀 Programming assignments | 3 × 2% | 6% |
| 🤩 Examlets | 9 × 6% | 54% |
| 🏆 Final exam | cumulative | 26% |
| 100% |
80% of your grade is written under invigilation.
Today’s Plan:
Observations:
Suppose a computer executes \(10^{12}\) operations per sec.
| operations | n=10 | n=100 | n=1000 | n=10,000 | n=\(10^{12}\) |
|---|---|---|---|---|---|
| \(n\) | \(10^{-11}\) s | \(10^{-10}\) s | \(10^{-9}\) s | \(10^{-8}\) s | 1 s |
| \(n \log n\) | \(10^{-11}\) s | \(10^{-9}\) s | \(10^{-8}\) s | \(10^{-7}\) s | 40 s |
| \(n^2\) | \(10^{-10}\) s | \(10^{-8}\) s | \(10^{-6}\) s | \(10^{-4}\) s | \(10^{12}\) s |
| \(n^3\) | \(10^{-9}\) s | \(10^{-6}\) s | \(10^{-3}\) s | 1 s | \(10^{24}\) s |
| \(2^n\) | \(10^{-9}\) s | \(10^{18}\) s | \(10^{289}\) s |
What questions do you have about the code?
CPSC 221