Chapter 01 -- Why Data Structures Matter

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

1/28

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 7:54 PM on 7/29/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

29 Terms

1
New cards
Data
Information such as numbers, strings, or values used by a program
2
New cards
Data structure
A way of organizing data so it can be used efficiently
3
New cards
Why data structures matter
The way data is organized can affect how fast code runs
4
New cards
Code efficiency
How fast code runs based on the number of computational steps it takes
5
New cards
Measuring speed
Counting how many computational steps an operation takes instead of using seconds
6
New cards
Array
A foundational data structure that stores values in an ordered list
7
New cards
Array size
The number of elements in an array
8
New cards
Index
The position number of a value inside an array, usually starting at 0
9
New cards
Read
Looking up a value at a specific index
10
New cards
Search
Looking for a specific value and finding where it is located
11
New cards
Insert
Adding a new value to a data structure
12
New cards
Delete
Removing a value from a data structure
13
New cards
Reading from an array
Fast because the computer can jump directly to a known index
14
New cards
Searching an array
Slower because the computer may need to check each value one by one
15
New cards
Linear search
Searching by checking each value one at a time
16
New cards
Worst-case array search
Searching may take N steps if the array has N elements
17
New cards
Insertion at the end of an array
Fast because no existing values need to shift
18
New cards
Insertion in the middle of an array
Slower because values must shift right to make room
19
New cards
Insertion at the beginning of an array
Slowest array insertion because all existing values must shift right
20
New cards
Deletion from an array
Removing a value and shifting remaining values left if needed
21
New cards
Deletion at the beginning of an array
Slow because the remaining values must shift left
22
New cards
Deletion at the end of an array
Fast because no shifting is needed
23
New cards
Set
A data structure similar to an array, but duplicates are not allowed
24
New cards
Array-based set
A set built like an array, but it checks for duplicates before insertion
25
New cards
Why set insertion is slower
The set must search first to make sure the value is not already present
26
New cards
Array vs set
Arrays allow duplicates; sets prevent duplicates
27
New cards
When to use an array
Use an array when duplicates are allowed and simple insertion matters
28
New cards
When to use a set
Use a set when duplicate values must be prevented
29
New cards
Main lesson of Chapter 01
Choosing the right data structure affects the efficiency of your co