1.4.2 Data Structures Flashcards

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

What is a stack?

A

-A stack is a linear data structure that follows LIFO.
-It allows insertion and deletion of elements at only one end call the top.

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

What is a queue?

A

-A queue is a linear data structure that follows FIFO.
-It allows insertion of elements at one end called the rear and deletion of elements at the front.

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

What is a linked list?

A

-A linked list a is a data structure that consists of a series of nodes.
-Each node contains a value and reference to the next node in the list.
-It allows for efficient insertion and deletion.

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

What is a tree?

A
  • non linear data structure
    -it has a root node and each node can have one or more child nodes.
    -they can be used for searching and sorting
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a node?

A

-A node is a point in a system where data is stored, processed or passed between other points.

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

What is a hash table?

A

-A hash table uses a hash function to map keys to indices in an array
-Commonly used in to implement dictionaries and sets

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

What us a heap?

A
  • It is specialized tree based structure that states that either the parent node is less than or equal to or greater than each of its children
    -Used for sorting finding min and max element in a set
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is an array?

A

-An array is a linear data structure that stores a fixed size collection of elements of the same type.

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

What is priority queue?

A

-its a data structure that stores elements with priority values and allows for efficient extraction of the element with the highest or lowest priority

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

What is a tuple?

A

-similar to a list but it is immutable (the elements within it can not be modified or changed)

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