Complete Teaching Plan & Lecture Notes
15 Enhanced Slide Decks | 370+ Interactive Slides
Each deck includes Canvas visualizations, step-through animations, playgrounds, and challenge quizzes.
Use arrow keys or buttons to navigate
Singly linked list: nodes, traversal, insert/delete, time complexity
Big-O, growth rates, best/worst/average case, empirical analysis
Base/recursive cases, call stack, tail recursion, divide & conquer
LIFO, array/linked implementations, parentheses matching, postfix eval
FIFO, circular array, linked implementation, BFS preview, deque
Dynamic arrays, amortized analysis, positional lists, iterators
Units 1-2 assessment: linked lists through array lists
PQ ADT, sorted/unsorted list implementations, comparators
Binary heap, array representation, upheap/downheap, heapsort
Map ADT, hash functions, collision handling, load factor, rehashing
Binary trees, BST, traversals, balanced trees (AVL preview)
Graph terminology, representations, adjacency matrix/list
Traversal algorithms, applications, edge classification, topological sort
Dijkstra's, Bellman-Ford, negative cycles, applications
Present the concept with text, analogies, and key-idea boxes. Let students read and absorb.
Step through the algorithm on Canvas. Use "Step" button for manual pace, "Auto Play" to show the full flow. Reset and re-run for emphasis.
Pause at sCA/sCB/sCC slides. Give students 2-3 minutes to predict, then reveal. Great for think-pair-share.
Use as exit ticket or start of next class. sQ1 = quick check, sQ2 = trace, sQ3 = code prediction.
Algorithm animations with Step / Auto / Reset. Code lines highlight in sync with Canvas.
Students input values and watch operations animate. Great for "what if" exploration.
Side-by-side or toggle views (e.g., BFS vs DFS, sorted vs unsorted PQ). Ask "when would you pick each?"
sCA = Predict/Trace, sCB = Fix the Bug, sCC = Decision Scenario. Interleaved after teaching sections.
linked-list-enhanced.html | 27 slides | ~75 min
Show pointer rewiring. Pause after each step — ask "which pointer changes first and why?"
Let students call out values to insert. Then ask them to predict what happens on delete.
If you update head = newNode before newNode.next = head, you lose the list. Demo this with the step-through to make it visceral.
Students assume linked lists are "better." Emphasize: O(n) search, no random access, extra memory per node. Arrays win on cache locality.
sCA Predict final list after operations sCB Find the null-pointer bug sCC Array vs Linked List scenarios
algorithm-analysis-enhanced.html | 24 slides | ~65 min
Animated bar chart showing how functions grow as n increases. Students are always shocked how fast 2ⁿ explodes.
Step through nested loops, watch the operation counter. Ask "what happens if we double n?"
Emphasize: Big-O is an upper bound on growth rate, not exact count. 3n+5 is still O(n).
Use the sandwich analogy: Θ = tight fit, O = ceiling, Ω = floor. The interactive slide lets students toggle between them.
recursion-enhanced.html | 24 slides | ~70 min
Step through factorial(5) watching frames push/pop. Code lines highlight in sync. This is the "aha moment" slide.
Watch the recursion tree grow exponentially. Visually devastating — perfect for motivating memoization later.
Show the call stack — each call has its OWN variables. The stack visualizer makes this click. Then show problems that are natural for recursion but awkward with loops (tree traversal).
Demo what happens without a base case — stack overflow. Use the "Fix the Bug" challenge slide.
stacks-enhanced.html | 23 slides | ~55 min
Type an expression — watch stack push on '(' and pop on ')'. Try unbalanced cases. Students love seeing it fail on "{[}]".
Step through "3 4 + 2 *" — watch operands push and operators pop two + push result. Great for "trace the stack" exercises.
"Remember the call stack from last week? That IS a stack. Now we're building the data structure explicitly." This callback makes stacks feel motivated rather than arbitrary.
Students forget to check isEmpty() before pop(). Use the challenge slide to show this bug.
queues-enhanced.html | 23 slides | ~55 min
Watch front/rear pointers wrap around. Enqueue until full, then dequeue — the "circular" nature becomes obvious visually.
Same input, different order. Students see LIFO vs FIFO side-by-side. Ask "which is better for a printer queue?"
Teach queues immediately after stacks. The comparison toggle slide is powerful — same operations, opposite behavior. Students remember the contrast better than either in isolation.
Both look like front==rear! Solutions: waste one slot, or use a count variable. Demo both approaches — ask which is better.
arraylists-enhanced.html | 23 slides | ~60 min
Watch array double when full. The cost counter shows expensive copies happen rarely — perfect for introducing amortized analysis.
Insert at index 0 — watch ALL elements shift right. Makes O(n) insert-at-front viscerally obvious.
This is many students' first encounter with amortized reasoning. Use the "banker's method" analogy: each cheap insert "saves up" credit for the occasional expensive resize.
The resize counter demo is the killer slide here — show n insertions, count total copies, verify it's O(n) total → O(1) amortized.
After this lecture, students have seen 4 linear structures. Draw a comparison table on the board: Linked List vs Array vs Stack vs Queue — operations, time complexity, use cases. This is great midterm review material.
priority-queues-enhanced.html | 24 slides | ~60 min
Same sequence of inserts — sorted list keeps order (O(n) insert, O(1) removeMin) vs unsorted list (O(1) insert, O(n) removeMin). The visual comparison is eye-opening.
Start with: "Emergency room triage — who gets treated first?" Not FIFO (that's a regular queue). The person with highest priority. NOW define PQ.
Both implementations have one O(n) operation. "Can we get BOTH in O(log n)?" → This is the perfect cliffhanger for introducing heaps next class.
heap-enhanced.html | 26 slides | ~75 min
The tree + array dual view is the signature slide. Watch the node bubble up the tree while the array swaps below. Students see the correspondence instantly.
Enter any array, watch build-heap then repeated extractMin. Sorted output accumulates on the right. Compare with selection sort.
Students confuse heap-order with BST-order. In a min-heap, left child can be larger than right child! The tree visualization makes this clear.
parent(i) = (i-1)/2, children = 2i+1, 2i+2. Drill this with the challenge slide — students predict positions.
This is unintuitive. Use the step-through to show that most nodes are near the bottom (short downheap), few are near the top (long downheap). The sum telescopes.
maps-enhanced.html (22) + hashtables-enhanced.html (26) | ~2 lectures, 120 min total
Students type keys, see hash values and bucket assignments. Try "bad" hash functions (always returns 0) → everything clusters.
Same insertions, two collision strategies side-by-side. Watch chains grow vs linear probing clusters form.
Load factor crosses 0.75 → table doubles → all elements re-hash into new positions. Connects back to ArrayList resizing.
Average case O(1) with good hash + low load. Worst case O(n) if everything collides. Show the clustering demo.
trees-enhanced.html | 28 slides | ~80 min
Toggle between preorder, inorder, postorder, level-order on the SAME tree. Watch the visit order change. Ask "which gives sorted output for a BST?"
Insert values, watch tree grow. Insert sorted data → degenerates to linked list! Then insert random data → balanced. This is the key visual for motivating AVL/Red-Black.
"A linked list is a degenerate tree (each node has one child). A heap IS a tree (but with different ordering). BST combines the search efficiency of binary search with the flexibility of a linked structure."
The "find inorder successor" step confuses students. Use the step-through to show: find min in right subtree, copy value, delete that node. Walk through 2-3 examples.
Height = longest path DOWN to leaf. Depth = path UP to root. The interactive tree lets students click nodes and see both values.
graph-enhanced.html | 26 slides | ~70 min
Click to add nodes, drag to add edges. Toggle directed/undirected. Watch the adjacency matrix AND adjacency list update in real time. Students see the dual representation.
Toggle between sparse and dense graph — see matrix mostly empty (wasted space) vs list compact. Then dense → matrix fills up, list gets huge too.
Start with: "Social networks, road maps, the internet, course prerequisites — these are ALL graphs." Show 3-4 examples before formalizing. Students need to see WHY before WHAT.
BFS, DFS, Dijkstra, Bellman-Ford all build on this vocabulary and these representations. Spend extra time on adjacency list since most algorithms use it.
A tree IS a graph (connected, acyclic). This connection helps students see graphs as a generalization of everything they've learned.
bfs-enhanced.html | 24 slides | ~65 min
Watch the queue state, visited set, and "discovery frontier" expand level by level. The level-coloring makes the "ripple" pattern obvious.
Click any two nodes — BFS finds the shortest path. Ask "why does BFS guarantee shortest path in unweighted graphs?" (Because it explores by distance.)
This is the single most important insight. "Replace the queue with a stack and you get DFS." The data structure choice determines the traversal pattern. Callback to Weeks 5-6!
dfs-enhanced.html | 23 slides | ~70 min
Watch the recursion call stack grow and shrink alongside the graph traversal. Discovery/finish times animate on a timeline.
Same graph, toggle between BFS and DFS — dramatically different traversal orders. Ask "when would you prefer each?"
Course prerequisite DAG — DFS finish order reversed gives valid course sequence. Students see why it works.
Cover BFS and DFS in consecutive lectures. The comparison slide is essential — same graph, different structure. Students who see them side-by-side retain both better.
WHITE/GRAY/BLACK coloring determines edge types. Back edge → cycle. This is beautiful theory but can overwhelm — gauge the class. The step-through with colors helps enormously.
Missing visited check → infinite loop. This is the most impactful bug-fix challenge. Students who debug this remember to check visited forever.
shortest-path-enhanced.html | 24 slides | ~80 min
The "expanding cloud" visualization makes the greedy choice intuitive. Step through with PQ + dist table in sync.
Run Dijkstra on a negative-weight graph — watch it produce the WRONG answer. Then run Bellman-Ford on the same graph — correct! This contrast is unforgettable.
Spend 40 min on Dijkstra (slides 1-10): concept, relaxation, full trace. Students should feel confident. THEN drop the bomb: "it breaks with negative weights." The failure demo creates cognitive tension that motivates Bellman-Ford.
Slide 6 lets students enter dist[u], weight, dist[v] and see if relaxation triggers. Use this early — if students grok relaxation, both algorithms are easy.
Dijkstra uses: graphs (W13), PQ/heap (W9-10), greedy strategy. Bellman-Ford uses: edge relaxation (DP pattern). BFS = unweighted shortest path. This lecture ties the whole course together.
Every deck has 3 inline challenges (sCA, sCB, sCC). Pause, give 2-3 min, have students discuss with a partner, then reveal. Great for formative assessment.
Final 3 slides of each deck are quiz questions. Use as end-of-class check: sQ1 = quick multiple choice, sQ2 = trace exercise, sQ3 = predict code output. Collect responses via hand-raise or clicker.
After the playground demo, ask a student to "predict what happens if we insert 42" before clicking. Builds active engagement.
"Show the state of the heap after inserting 5, 3, 8, 1, 7." Mirrors the step-through animations — students who practiced with interactive slides ace these.
"For each scenario, which data structure is best?" Mirrors the sCC challenge slides. Tests deeper understanding.
"What is the time complexity of X using Y?" Requires connecting structure to operations.
"This code has a bug. Identify and fix it." Mirrors sCB slides. Tests practical understanding.
Midterm: Units 1-2 (Weeks 1-7)
Final: Units 3-6 (Weeks 9-15), cumulative
How topics connect — use this to emphasize callbacks during lectures
Quick reference for all data structures covered
All 15 decks with slide counts and key interactive features