Chapter 1 Flashcards

1
Q

The method be which data is organised is knows as?

A

Data structures

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Depending on how you choose to organise your data, your program may run faster or slower by orders of?

A

Magnitude

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The array data structure is defined as

A

a list of data elements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the index of an array?

A

The index of an array is the number which identifies where a piece of data lives inside the array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Most data structures used in four basic ways are referred to as

A

Operations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The four operations of data structures are

A

Read
Search
Insert
Delete

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Measuring the speed of an operation is also known as its what?

A

Time complexity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Looking up a value at a particular index is known as

A

Read

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Looking to see if a particular value exists within the array and if so, which index it falls at is known as

A

Search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Insert is known as

A

Adding a new value to an additional slot within the array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Delete is known as

A

Removing a value from the data structure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A computer’s memory can be viewed as

A

a giant collection of cells

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The kind of search operation where the computer checks each cell one at a time is known as?

A

Linear search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Why is searching less efficient than reading?

A

Searching is less efficient than reading because it takes many steps to search while it takes reading just one step no matter the size of the array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Insertion in a worst case scenario can take how many steps for inserting an array containing any number of elements?

A

N + 1 steps. Here, there are N shifts plus 1 insertion which makes up the total number of steps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

For an array containing N elements, the maximum number of steps that deletion would take is N steps

A