Reminder that you must complete the pre-reading before each class.
✔️ Pre-reading for Tuesday 6/1
✔️ Pre-reading for Wednesday 6/2
✔️ Pre-reading for Thursday 6/3
Pre-Reading for Essential Math Overview
This is a hefty unit designed to review several pre-algebra and pre-calculus topics. If you’re comfortable with these concepts, you may skim material as you see fit. If your math is rough around the edges, please review the Math Resources available on the resource page before completing these readings.
Essential Questions
Before attending class, please complete the material below and use the following questions to guide your note-taking:
✔️ What are the rules and properties of exponents?
✔️ What are the rules and properties of logarithms?
✔️ What does logarithmic growth look like?
✔️ What does exponential growth look like?
✔️ When are permutations useful and how are they calculated?
✔️ When are combinations useful and how are they calculated?
✔️ When are summations useful and how are they calculated?
✔️ When are factorials useful and how are they calculated?
Read/Watch/Review
Before attending class, please complete the material below.
- For a one-stop shop of Exponents and Logarithms, read Exponentials: Discrete, Real, and Imaginary. Alternatively, read the two separate readings below:
- Read Rules of Exponents
- Read Logarithms Explained
- Read Rules or Laws of Logarithms
- Read/Watch Permutations and Combinations
- Read Using Summation Notation
- Read Summation Notation (pay close attention to the formulas)
- Read/Watch Simplifying Factorials: The Easy Way
Pre-Reading for Dynamic Arrays
Essential Questions
Before attending class, please complete the material below and use the following questions to guide your note-taking:
✔️ How are dynamic arrays different from (static) arrays?
✔️ How do dynamic arrays work?
✔️ How do you know whether you should use a (static) array vs a dynamic array?
Read/Watch/Review
Before attending class, please complete the material below:
- Watch Dynamic array and Static array (12 min)
- The code example is in JavaScript but the description applies to C++ as well.
- Read Array Data Structure
- Read Dynamic Array Data Structure
- Watch What if you had to invent a dynamic array? (14 min)
- Watch The Simple and Elegant Idea behind Efficient Dynamic Arrays (8 min)
Pre-Reading for Basic Sorting Algos
Essential Questions
Before attending class, please complete the material below and use the following questions to guide your note-taking:
✔️ What’s the difference between stable and unstable sorting and why does it matter?
✔️ How does bubble sort work?
✔️ What is the time complexity of bubble sort and why?
✔️ How does insertion sort work?
✔️ What is the time complexity of insertion sort and why?
✔️ How does selection sort work?
✔️ What is the time complexity of selection sort and why?
Read/Watch/Review
- Order is important for the material below– especially the videos.
- Lalitha’s videos show you how to analyze the algorithms in the way we saw earlier this week– by explicitly counting primitive operations, whereas Back To Back SWE’s videos show you how to do it at a more abstract level, which is where we’re headed for future analyses.
- Back To Back SWE’s videos are particularly long so I recomend you split them up into chunks.
- Prioritize understanding Big-O (worst-case), since that’s what we’ll be working with most.
Before attending class, please complete the material below:
- Read Stable Sorting Algorithms
- Ignore section 3.3 “Radix Sort”
- Watch Stable Sort vs Unstable Sort Algorithms (4 min)
- Read Bubble Sort Algorithm
- Watch Bubble Sort (1 min)
- Watch Bubble Sort - Time Complexity (Lalitha, 11 min)
- Watch An In-Depth Algorithmic Analysis of Bubble Sort (Back to Back SWE, 29 min)
- Keep in mind that the Best Case analysis assumes using the optimized version of Bubble Sort, where if you don’t swap for an entire iteration then you stop altogether because the array is sorted.
- Read Insertion Sort Algorithm
- Watch Insertion Sort (2 min)
- Watch Insertion Sort - Time Complexity (Lalitha, 13 min)
- Watch A Detailed Algorithmic Analysis of Insertion Sort (Back to Back SWE, 37 min)
- Read Selection Sort Algorithm
- Watch Selection Sort (2 min)
- Note: For selection sort, you can find either the largest element smallest element– either approach is fine, as long as you’re consistent with the decision in any given implementation.
- Watch Selection Sort - Time Complexity (Lalitha, 11 min)
- Exercise: After seeing the more abstract time analysis of bubble sort and insertion sort, can you complete a similar analysis of selection sort?
Additional material if you’d like different explanations of the same concepts:
- Read The Bubble Sort
- Watch Introduction to Bubble Sort (8 min)
- Read The Selection Sort
- Watch Introduction to Selection Sort (11 min)
- Read The Insertion Sort
- Watch Introduction to Insertion Sort (13 min)