Arrays

Arrays store multiple values of the same type. Learn to declare, access, and iterate over arrays.

50 lessons
203 min

Lessons

1. Intro

The Goal

4m

2. What is an Array?

Indexed containers

4m

3. Why Use Arrays?

Benefits of using arrays

4m

4. Declaring Arrays

How to declare an array

4m

5. Array Size

Understanding fixed sizing

4m

6. Quiz: Array Basics

Test understanding

3m1 problems

7. Accessing Elements

Reading and writing values

4m

8. Zero-Based Indexing

Why arrays start at index 0

4m

9. Quiz: Zero-based indexing

Zero-based indexing

3m1 problems

10. Out of Bounds Access

Invalid index dangers

4m

11. Quiz: Array Indexing

Test understanding

3m1 problems

12. Initializing Arrays

Providing initial values

4m

13. Partial Initialization

When you provide fewer values

4m

14. Uniform Initialization

C++11 brace initialization

4m

15. Quiz: Initialization

Test understanding

3m1 problems

16. Iterating with for Loop

Visiting each element

4m

17. Challenge: Array Sum

Traverse and accumulate

7m1 problems

18. The Array-Loop Pattern

Standard iteration structure

4m

19. Finding the Size

Calculate array length

4m

20. Quiz: Iteration

Test understanding

3m1 problems

21. Modifying Elements

Updating array contents

4m

22. Common Array Operations

Processing all elements

4m

23. Challenge: Find Maximum

Search through array

7m1 problems

24. Finding Minimum

Locating the smallest element

4m

25. Finding Maximum

Locating the largest element

4m

26. Quiz: Collection basics

Collection basics

3m1 problems

27. Counting Elements

How many meet a condition

4m

28. Quiz: Array Operations

Test understanding

3m1 problems

29. Passing Arrays to Functions

How arrays are passed

4m

30. Array Decay

Why sizeof fails in functions

4m

31. Passing Size Separately

Why you need a size parameter

4m

32. Quiz: Functions with Arrays

Test understanding

3m1 problems

33. Multidimensional Arrays

Arrays of arrays

4m

34. 2D Array Syntax

Declaring and initializing

4m

35. Nested Loops for 2D

Iterating over all elements

4m

36. Problem - Reverse Array

Reversing order of elements

4m1 problems

37. Problem - Find Duplicates

Detecting repeated elements

4m1 problems

38. Problem - Stones on Table

Counting adjacent same colors

4m1 problems

39. Stones - The Idea

Adjacent comparison pattern

4m

40. Stones - Algorithm

Traversal approach

4m

41. Quiz: Collection basics

Collection basics

3m1 problems

42. Stones - Implementation

Working solution

7m1 problems

43. Lessons from Stones

What we learned

4m

44. Problem - George & Rooms

Filtering with conditions

4m1 problems

45. George - The Idea

Difference calculation

4m

46. George - Algorithm

Count-as-you-go approach

4m

47. Quiz: Collection basics

Collection basics

3m1 problems

48. George - Implementation

Working solution

7m1 problems

49. Lessons from George

What we learned

4m

50. Section Recap

What we learned

5m

Ready to start learning?

Access all 50 lessons with interactive content and progress tracking.