Please enable JavaScript to use CodeHS

Chapter 8

2D Arrays

8.2 Traversing 2D Arrays

Traversing a 2D Array - Nested Iteration

Enhanced For Loop with 2D Arrays

Linear Search with 2D Arrays

Standard 2D Array Algorithms

Traversing Gradebook

Linear Search 2D Arrays

Row vs. Column Major

Check Your Understanding

  1. Incorrect Correct No Answer was selected Invalid Answer

Exercise: Sum Rows in a 2D Array

Vocabulary

Term Definition
Row Major Order The process of traversing a 2D array by accessing all elements in a row before moving on to the next row.
Column Major Order The process of traversing a 2D array by accessing all values at the first column in every row, before moving to the next column