¡GoConqr estrena diseño! Cuéntanos qué te parece.

Apuntes

1D and 2D Arrays

Gabrielle Keen Inglés 2 páginas

Contenido del apunte (2)

Página 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.

Página 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.

Información

Descripción
Apunte sobre 1D and 2D Arrays, creado por Gabrielle Keen el 08/03/2024.
Creado por
Gabrielle Keen · mar 2024
Actualizado
8 mar 2024
Visitas
4
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?