Fundamentals Of Data Structures Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is a data structure

A

A common format for storing large volumes of related data which is an implementation of an abstract data type

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

What is an array

A

A set of related data items stored under a single identifier

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

What is a text file

A

a file that contains human-readable characters

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

What is a binary file

A

stores data as sequences of 0s and 1s

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

What is a record

A

one line of a text file

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

What is a field

A

an item of data

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

What is a queue

A

a data structure where the first item is added and first to be removed

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

What is stack

A

a data structure where the first item added is the first item removed

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

What is a static data structure

A

a method of storing data where the amount of data stored (and the amount of memory used to store it) is fixed

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

What is a dynamic data structure

A

a method of storing data where the amount of data stored and memory will vary as the program is being run

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

What is a heap

A

a pool of unused memory that can be allocated to a dynamic data structure

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

Advantages of Static Data Structure

A
    • fast access to each element

- - structures are a fixed size so they’re more predictable

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

Disadvantage of Static Data Structure

A

– inneficient as memory is allocated that may not be needed

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

Advantages of a Dynamic Data Structure

A
    • efficient as the amount of memory varies as needed

- - can use the heap if necessary

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

Disadvantages of a Static Data structure

A
    • Slower access to each element as memory is allocated at run time
    • memory addresses allocated may be fragmented so slower access
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a stack

A

A LIFO structure where the last item of data added is the first to leave

17
Q

What is a pointer

A

a data item that identifies a particular elemnt in the data structure

18
Q

What is recursion

A

the process of a subroutine calling itself

19
Q

What are the three types of queues

A
    • Linear Queue
    • Circular Queue
    • Priority Queue
20
Q

What is a linear queue

A

A FIFO structure organised as a line of data such as a list

21
Q

What is a circular queue

A

A FIFO data structure implemented as a ring where the front and rear pointers can wrap around the end to the start of the array

22
Q

What is a priority queue

A

A variation of a FIFO structure where some data may leave out of sequence as it has a higher priority than other data items.

23
Q

What is an undirected graph

A

A graph where the relationship between vertices is two way

24
Q

What is a directed graph

A

A grapgh in which the relationship between the vertices is one way

25
Q

What is the difference between an adjacency list and adjacency matrix

A
  • A list requires less memory as it only stores values where necessesary
  • matrixes can be identified more quickly
26
Q

What is the three features of a tree

A
    • Fully connected
    • Undirected
    • No cycles