Please enable JavaScript to use CodeHS

Data Structures in C++ - Outline

  1. C++ Basics

    1. 1.1 Input, Output, and Program Structure

    2. Notes 1.1.1 Input, Output, and Program Structure
    3. Example 1.1.2 Hello World
    4. Example 1.1.3 Input and Output
    5. Example 1.1.4 getline and cin
    6. Example 1.1.5 Program Structure
    7. Quiz 1.1.6 Quiz: Input, Output, and Program Structure
    8. Exercise 1.1.7 Create a Haiku
    9. Exercise 1.1.8 Favorites
    10. Exercise 1.1.9 Put the Code in Order
    11. 1.2 Basic Data Types

    12. Notes 1.2.1 Basic Data Types
    13. Example 1.2.2 Strings and Characters
    14. Example 1.2.3 Numbers
    15. Example 1.2.4 Booleans
    16. Quiz 1.2.5 Quiz: Basic Data Types
    17. Exercise 1.2.6 Hole in One
    18. Exercise 1.2.7 Loose Change
    19. Exercise 1.2.8 Fast Food
    20. 1.3 Conditional Statements

    21. Notes 1.3.1 Conditional Statements
    22. Example 1.3.2 Basic If/Else Statements
    23. Example 1.3.3 Comparing Strings
    24. Example 1.3.4 Logical Operators
    25. Quiz 1.3.5 Quiz: Conditional Statements
    26. Exercise 1.3.6 Paper Supplier
    27. Exercise 1.3.7 Choose your own adventure
    28. 1.4 Loops

    29. Notes 1.4.1 Loops
    30. Example 1.4.2 For Loops
    31. Example 1.4.3 While Loops
    32. Example 1.4.4 Searching a String
    33. Quiz 1.4.5 Quiz: Loops
    34. Exercise 1.4.6 Summing a Number's Digits
    35. Exercise 1.4.7 Hacker Speak
    36. Exercise 1.4.8 The Necklace Problem
    37. 1.5 Functions in C++

    38. Notes 1.5.1 Functions in C++
    39. Example 1.5.2 Defining and Calling Functions
    40. Example 1.5.3 Passing by Reference vs Value
    41. Example 1.5.4 Function Prototypes
    42. Quiz 1.5.5 Quiz: Functions in C++
    43. Exercise 1.5.6 Drawing a Triangle
    44. Exercise 1.5.7 Easier Input
    45. Exercise 1.5.8 Encryption
    46. 1.6 Project: Code Verification

    47. Exercise 1.6.1 Code Verification
    48. 1.7 End of Unit Quiz

    49. Quiz 1.7.1 Quiz: C++ Basics
  2. Going Beyond The Basics

    1. 2.1 Vector Basics

    2. Notes 2.1.1 Vector Basics
    3. Example 2.1.2 Creating and Accessing Vectors
    4. Example 2.1.3 Inserting into a Vector
    5. Example 2.1.4 Looping Through a Vector
    6. Quiz 2.1.5 Quiz: Vector Basics
    7. Exercise 2.1.6 Splitting a Vector
    8. Exercise 2.1.7 A Sorted Addition
    9. Exercise 2.1.8 Final Grade Calculator
    10. 2.2 Function Default Values

    11. Notes 2.2.1 Function Default Values
    12. Example 2.2.2 Default Values
    13. Example 2.2.3 Default Values with a Prototype
    14. Example 2.2.4 Example: Splitting a String
    15. Quiz 2.2.5 Quiz: Function Default Values
    16. Exercise 2.2.6 Burrito Bowl
    17. Exercise 2.2.7 Better Number Inputs
    18. Exercise 2.2.8 Appointment Follow Up
    19. 2.3 Structs

    20. Notes 2.3.1 Structs
    21. Example 2.3.2 Defining and Accessing Structs
    22. Example 2.3.3 Using Structs: Line Length
    23. Quiz 2.3.4 Quiz: Structs
    24. Exercise 2.3.5 Songs
    25. Exercise 2.3.6 Movies - Part 1
    26. 2.4 File Input/Output

    27. Notes 2.4.1 File Input/Output
    28. Example 2.4.2 Reading In a File
    29. Example 2.4.3 Processing a File
    30. Example 2.4.4 Writing To a File
    31. Quiz 2.4.5 Quiz: File Input/Output
    32. Exercise 2.4.6 Sum From A File
    33. Exercise 2.4.7 Movies - Part 2
    34. 2.5 Error Handling

    35. Notes 2.5.1 Error Handling
    36. Example 2.5.2 Validating a Number
    37. Example 2.5.3 Validating a Vector Index
    38. Example 2.5.4 Throwing Other Values
    39. Quiz 2.5.5 Quiz: Error Handling
    40. Exercise 2.5.6 Next Birthday
    41. Exercise 2.5.7 Movies - Part 3
    42. 2.6 Project: Karel Internship

    43. Exercise 2.6.1 Part 1 - Karel Internship
    44. Exercise 2.6.2 Part 2 - Karel Internship
    45. 2.7 End of Unit Quiz

    46. Quiz 2.7.1 Quiz: Going Beyond The Basics
  3. Libraries

    1. 3.1 Header Files

    2. Notes 3.1.1 Header Files
    3. Example 3.1.2 Header File
    4. Example 3.1.3 Header and Implementation File
    5. Example 3.1.4 Safer Header
    6. Quiz 3.1.5 Quiz: Header Files
    7. Exercise 3.1.6 Convert to Uppercase
    8. Exercise 3.1.7 Basic Math Library
    9. 3.2 Using Libraries

    10. Notes 3.2.1 Using Libraries
    11. Example 3.2.2 The Util Library
    12. Example 3.2.3 Built in Util Library
    13. Quiz 3.2.4 Quiz: Using Libraries
    14. Exercise 3.2.5 Number Guessing Game
    15. Exercise 3.2.6 Patient Records
    16. 3.3 Project: The Game of Pig

    17. Free Response 3.3.1 The Game of Pig
    18. Exercise 3.3.2 Build the Basic Program
    19. Exercise 3.3.3 Adding a Computer Opponent
    20. 3.4 End of Unit Quiz

    21. Quiz 3.4.1 Quiz: Libraries
  4. 2D Vectors, Stacks, and Queues

    1. 4.1 2D Vectors

    2. Notes 4.1.1 2D Vectors
    3. Example 4.1.2 The 2D Vector
    4. Example 4.1.3 Creating a 2D Vector
    5. Quiz 4.1.4 Quiz: 2D Vectors
    6. Exercise 4.1.5 Magic Square Tester
    7. Exercise 4.1.6 Gradient
    8. 4.2 Project: The Game of Life

    9. Exercise 4.2.1 Creating the Board
    10. Exercise 4.2.2 Adding the Simulator
    11. 4.3 Stacks

    12. Notes 4.3.1 Stacks
    13. Example 4.3.2 Basic Stack
    14. Example 4.3.3 Stack Example: Reverse a String
    15. Quiz 4.3.4 Quiz: Stacks
    16. Exercise 4.3.5 Browser History
    17. Exercise 4.3.6 Error Checking
    18. 4.4 Project: RPN Calculator

    19. Demo 4.4.1 What is an RPN Calculator?
    20. Exercise 4.4.2 Building the Calculator
    21. 4.5 Queues

    22. Notes 4.5.1 Queues
    23. Example 4.5.2 Basic Queue
    24. Example 4.5.3 Queue Example: Next in Line
    25. Quiz 4.5.4 Quiz: Queues
    26. Exercise 4.5.5 Line Simulator - Single Queue
    27. Exercise 4.5.6 Line Simulator - Three Queues
    28. 4.6 Project: Karaoke Night

    29. Exercise 4.6.1 Project: Karaoke Night
    30. 4.7 End of Unit Quiz

    31. Quiz 4.7.1 Quiz: 2D Vectors, Stacks, and Queues
  5. Sets and Maps

    1. 5.1 Pairs and Iterators

    2. Notes 5.1.1 Pairs and Iterators
    3. Example 5.1.2 Pairs
    4. Example 5.1.3 Iterators
    5. Quiz 5.1.4 Quiz: Pairs and Iterators
    6. Exercise 5.1.5 Deck of Cards
    7. Free Response 5.1.6 Comparing ways to Loop Through a Vector
    8. 5.2 Sets

    9. Notes 5.2.1 Sets
    10. Example 5.2.2 Basic Sets
    11. Example 5.2.3 Iterating Through a Set
    12. Example 5.2.4 Sets of Struct Values
    13. Quiz 5.2.5 Quiz: Sets
    14. Exercise 5.2.6 Visiting All the Teams
    15. Exercise 5.2.7 Movies - Part 4
    16. 5.3 Project: Bingo

    17. Demo 5.3.1 Bingo - Demo
    18. Exercise 5.3.2 Part 1 - Game Setup
    19. Exercise 5.3.3 Part 2 - Playing a Turn
    20. Exercise 5.3.4 Part 3 - Finding a Winner
    21. 5.4 Maps

    22. Notes 5.4.1 Maps
    23. Example 5.4.2 Map Basics
    24. Example 5.4.3 Iterating Through a Map
    25. Example 5.4.4 Updating Maps
    26. Quiz 5.4.5 Quiz: Maps
    27. Exercise 5.4.6 Word Count
    28. Exercise 5.4.7 Car Registration
    29. 5.5 Project: FRC Scoring System

    30. Free Response 5.5.1 FRC Scoring - Planning
    31. Exercise 5.5.2 FRC Scoring - Build
    32. 5.6 End of Unit Quiz

    33. Quiz 5.6.1 Quiz: Sets and Maps
  6. Recursion

    1. 6.1 Functional Recursion

    2. Notes 6.1.1 Functional Recursion
    3. Example 6.1.2 Basic Recursive Problem: Exponential
    4. Example 6.1.3 Recursion Example: Reverse String
    5. Example 6.1.4 Recursion Example: Make Sum
    6. Quiz 6.1.5 Quiz: Functional Recursion
    7. Exercise 6.1.6 Sum Digits
    8. Exercise 6.1.7 Remove a Letter
    9. Exercise 6.1.8 Valid DNA Sequences
    10. Exercise 6.1.9 Subsequence
    11. 6.2 Procedural Recursion

    12. Notes 6.2.1 Procedural Recursion
    13. Example 6.2.2 Print Binary
    14. Example 6.2.3 Recursion Example: Print Permutations
    15. Example 6.2.4 Depth versus Breadth Search
    16. Quiz 6.2.5 Quiz: Procedural Recursion
    17. Exercise 6.2.6 Print All Binary Permutations
    18. Exercise 6.2.7 Pascal's Triangle
    19. Exercise 6.2.8 Phone Words
    20. 6.3 Recursive Backtracking

    21. Notes 6.3.1 Recursive Backtracking
    22. Example 6.3.2 Basic Backtracking
    23. Example 6.3.3 Eight Queens
    24. Quiz 6.3.4 Quiz: Recursive Backtracking
    25. Exercise 6.3.5 Dice Sum
    26. Exercise 6.3.6 Airfreight
    27. Exercise 6.3.7 Cell Phone Towers
    28. 6.4 Project: Sudoku Solver

    29. Exercise 6.4.1 Set Up
    30. Exercise 6.4.2 isValid
    31. Exercise 6.4.3 nextEmpty
    32. Exercise 6.4.4 Final Build
    33. 6.5 End of Unit Quiz

    34. Quiz 6.5.1 Quiz: Recursion
  7. Pointers, Linked Lists, and Graphs

    1. 7.1 Pointers

    2. Notes 7.1.1 Pointers
    3. Example 7.1.2 Assigning and Updating Pointers
    4. Example 7.1.3 Pointers and Functions
    5. Example 7.1.4 Pointers and Data Structures
    6. Quiz 7.1.5 Quiz: Pointers
    7. Exercise 7.1.6 Print Stats
    8. Exercise 7.1.7 Stocks - Part 1
    9. Exercise 7.1.8 Stocks - Part 2
    10. 7.2 Project: Team Roster

    11. Demo 7.2.1 Project Demo
    12. Exercise 7.2.2 Team Roster
    13. 7.3 Linked Lists

    14. Notes 7.3.1 Linked Lists
    15. Example 7.3.2 Basic Linked List
    16. Example 7.3.3 Linked List and Recursion
    17. Example 7.3.4 Example: Sorted Phone Book
    18. Quiz 7.3.5 Quiz: Linked List
    19. Exercise 7.3.6 Remove From the Phone Book
    20. Exercise 7.3.7 Really Long Division
    21. Example 7.3.8 Doubly Linked List
    22. Exercise 7.3.9 Playlist
    23. 7.4 Project: Mail Forwarding

    24. Exercise 7.4.1 Part 1: Creating the Structure
    25. Exercise 7.4.2 Part 2: Adding Utilities
    26. Exercise 7.4.3 Adding the User Interface
    27. 7.5 Graphs

    28. Notes 7.5.1 Graphs
    29. Example 7.5.2 Basic Example: Breadth First Search
    30. Example 7.5.3 Application: Connecting Cities
    31. Quiz 7.5.4 Quiz: Graphs
    32. Exercise 7.5.5 Extending Connecting Cities
    33. Exercise 7.5.6 LinkedOut: A High School Social Network
    34. 7.6 End of Unit Quiz

    35. Quiz 7.6.1 Quiz: Pointers, Linked Lists, and Graphs
  8. Final Project

    1. 8.1 Virtual Lines

    2. Demo 8.1.1 Final Project Demo
    3. Exercise 8.1.2 Part 1 - Creating the Basic Queue
    4. Exercise 8.1.3 Part 2 - Adding Basic Functionality
    5. Exercise 8.1.4 Part 3 - Adding the User Interface
    6. Exercise 8.1.5 Part 4 - Only One Queue per Person