41 compile-checked programs · C++17
Examples that follow the learning path.
Every filename begins with its lecture reference. Each example uses only concepts taught by that lecture; motivating previews show results without exposing later syntax.
38 examples
Select an example
Choose an example to load its source.
Programming & Problem Solving
Minimal program structure and observable output.
Types & Representation
Range, precision, constants, inference, and conversion.
Expressions, Scope & Program State
Names, visibility, storage duration, and linkage.
lecture-03-expressions-and-scope.cpp
Static and externPersistent local state plus an externally defined value.lecture-03-storage-and-linkage.cpp
Shared definitionTranslation-unit definition used by the linkage example.lecture-03-shared-data.cpp
Decisions & Safe Branching
Ordered safety rules and explicit boundaries.
Iteration I · while & Input Validation
Condition-controlled repetition and progress.
Iteration II · for, Nested Loops & Invariants
Counted ranges and row–column combinations.
Functions I · Contracts & Calls
Value parameters, return values, and decomposition.
Functions II · References & Decomposition
References, const access, and call structure.
Arrays I · Fixed Sequences & Traversal
Fixed extents, indices, bounds, and traversal.
Arrays II · Matrices & std::vector
Multiple dimensions and runtime-sized sequences.
Strings & Text Processing
Owned text, input, classification, and validation.
Debugging & Assessment Debrief
Contracts, boundary cases, integration, and regression tests.
Records, Pointers & Memory Layout
Structured records, addresses, indirection, and layout.
Dynamic Memory & Linked Structures
Ownership, allocation, smart pointers, and links.
Linear Structures & Array Algorithms
ADTs, search, sort, stacks, and queues.
lecture-15-linear-search.cpp
Array stackLIFO operations as free functions over a plain state record.lecture-15-array-stack.cpp
Linked queueFIFO free functions over dynamically linked nodes.lecture-15-linked-queue.cpp
Record queueStudent records in a circular-array queue without class prerequisites.lecture-15-record-queue.cpp
Elementary sortsBubble, selection, and insertion sort traces.lecture-15-elementary-sorts.cpp
Recursive Decomposition in Practice
Base cases, progress, and linked transformations.
Search Trees, Heaps & Sorting
Algorithms that preserve ordering and structural invariants.
lecture-17-binary-search.cpp
Binary search treeInsertion, search, deletion, traversals, and cleanup.lecture-17-binary-search-tree.cpp
Heap and heap sortHeapify, insertion, extraction, and phased sorting.lecture-17-heap-and-heapsort.cpp
Merge sortRecursive and bottom-up merge sort plus inversion counting.lecture-17-merge-sort.cpp
Object Design & Value Semantics
Construction, copying, invariants, and operators.
Friend Access & Inheritance Foundations
Narrow privilege and justified is-a relationships.
Inheritance & Runtime Polymorphism
Virtual interfaces, safe ownership, and factories.
Polymorphic Data Structures
Heterogeneous ownership behind a common interface.
Applied Object Systems
Domain models, collection algorithms, graphs, and patterns.
Recursive & Polymorphic Capstones
Buckets, matrices, trees, and hierarchy applications.
lecture-23-radix-sort.cpp
Invert a treeRecursive subtree transformation with unique ownership.lecture-23-invert-tree.cpp
Linked Snake gamePlayable turn-based Snake with an explicit segment chain, collision invariants, and ASCII rendering.lecture-23-snake-linked-game.cpp
Grid cleaning robotRobot simulation that visualizes vector-queue BFS routes to the nearest dirt.lecture-23-grid-cleaning-robot.cpp
Multi-agent graph cleaningObject-oriented cleaners coordinate vector-stored BFS routes and distinct target reservations.lecture-23-multi-agent-graph-cleaning.cpp
No examples match that search.