Notizen
1D and 2D Arrays
Inhalt der Notizen (2)
Seite 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.
Seite 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.
Informationen
- Beschreibung
- Notiz am 1D and 2D Arrays, erstellt von Gabrielle Keen am 08/03/2024.
- Erstellt von
- Gabrielle Keen · Mär 2024
- Aktualisiert
- 8 Mär 2024
- Aufrufe
- 4
- Bewertung