Arrays

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/9

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:44 AM on 4/2/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

10 Terms

1
New cards

Declare a 1D array

DECLARE FirstNames : ARRAY[1:5] OF STRING

2
New cards

Declare a 2D array

DECLARE FullNames : ARRAY[1:5, 1:2] OF STRING

  • Declare row first

3
New cards

Array benefits

  • Values can be accessed through a loop-controlled variable

  • Easy to design, test and code

  • Multiple instances only need to reference one identifier

4
New cards

Term for minimum and maximum values an array can take

Lower bound, upper bound

5
New cards

Term for the variable n in the pseudocode expression

Index

6
New cards

Declaring membership array of type student

DECLARE Membership : ARRAY[1:3000} OF Student

7
New cards

Efficient bubble sort (ascending) - 2D array, 1000 students and their corresponding marks

PROCEDURE Sort()

….DECLARE Temp : INTEGER

….DECLARE NoSwaps : BOOLEAN

….DECLARE Boundary, Row, Col : INTEGER

….Boundary ← 999

….REPEAT

……..NoSwaps ← TRUE

……..FOR Row ← 1 TO Boundary

…………IF Result[Row, 2] > Result[Row + 1, 2] THEN

…………….FOR Col ← 1 TO 2

………………..Temp ← Result[Row, Col]

………………..Result[Row, Col] ← Result[Row + 1, Col]

………………..Result[Row + 1, Col] ← Temp

…………….NEXT Col

…………….NoSwaps ← FALSE

…………ENDIF

……..NEXT Row

……..Boundary ← Boundary - 1

….UNTIL NoSwaps = TRUE

ENDPROCEDURE

8
New cards

“Benefits of arrays”

  • Multiple instances reference single identifier, fewer identifiers needed

  • Easier to process/search - array can be iterated through

  • Makes the program easier to write / debug

9
New cards

“State three benefits of using an array of records to store data”

  • Allows for iteration, can use a loop to access records

  • Use of index to directly access a record in the array

  • Simplifies the code, reduces duplication // program easier to write

10
New cards

Uses and benefits of arrays

  • Simplify an algorithm, makes it easier to amend or add data

  • Are easier to understand, test and debug

  • It is possible to iterate through the values using a loop - make data organisation easier

  • Arrays of records can store multiple data types

Explore top notes

note
Chapter 9: Chemical Equilibrium
Updated 1095d ago
0.0(0)
note
Wedding Wind
Updated 1257d ago
0.0(0)
note
College Prep Chemistry, Elements
Updated 1281d ago
0.0(0)
note
Grade 10 Biology: Lesson 9
Updated 1181d ago
0.0(0)
note
Chapter 9: Chemical Equilibrium
Updated 1095d ago
0.0(0)
note
Wedding Wind
Updated 1257d ago
0.0(0)
note
College Prep Chemistry, Elements
Updated 1281d ago
0.0(0)
note
Grade 10 Biology: Lesson 9
Updated 1181d ago
0.0(0)

Explore top flashcards

flashcards
Odyssey Test review
85
Updated 535d ago
0.0(0)
flashcards
duits kapitel 2 woordenschat
101
Updated 878d ago
0.0(0)
flashcards
US State Capitals
50
Updated 937d ago
0.0(0)
flashcards
APUSH 23-25 Simple IDs
90
Updated 60d ago
0.0(0)
flashcards
French Indefinite Articles
34
Updated 705d ago
0.0(0)
flashcards
AP Psych Unit 3
79
Updated 861d ago
0.0(0)
flashcards
Waves key words and definitions
21
Updated 476d ago
0.0(0)
flashcards
Map of East Asia- Physical map
34
Updated 428d ago
0.0(0)
flashcards
Odyssey Test review
85
Updated 535d ago
0.0(0)
flashcards
duits kapitel 2 woordenschat
101
Updated 878d ago
0.0(0)
flashcards
US State Capitals
50
Updated 937d ago
0.0(0)
flashcards
APUSH 23-25 Simple IDs
90
Updated 60d ago
0.0(0)
flashcards
French Indefinite Articles
34
Updated 705d ago
0.0(0)
flashcards
AP Psych Unit 3
79
Updated 861d ago
0.0(0)
flashcards
Waves key words and definitions
21
Updated 476d ago
0.0(0)
flashcards
Map of East Asia- Physical map
34
Updated 428d ago
0.0(0)