GoConqr has a new look! Let us know what you think.

Notes

1D and 2D Arrays

Gabrielle Keen English 2 pages

Content of the notes (2)

Page 1

1D Arrays - Day One Notes

Slots start at 0.

Example: For 7 slots... 0 - 6.

Count on fingers. 0, 1, 2, 3, 4, 5, 6 = 7

Size x

Largest index is x-1

Example: 10 = 11 and 9 = 10

No Negatives

Array could create a log in system.

Page 2

2D Arrays

2 indexes instead of one.

[] []

First "box" = rows

Second "box" = columns

Use "for" loop for Outer which would be for rows.

2nd "for" loop for inner which would be for columns.

*For each loops

Module 6:

Linear Search - for loop with an if statement takes too long.

Binary Search - Splits search space in half.

Binary search = sort data first. Sorting is difficult and takes a long time.

Information

Description
Note on 1D and 2D Arrays, created by Gabrielle Keen on 08/03/2024.
Created by
Gabrielle Keen
Views
4
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?