Data structures Flashcards

1
Q

Array?

A

A data structure that hold a number of data items of the same data type

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

Record?

A

Data structure that consists of a fixed number of variables called fields

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

List?

A

Abstract data type that describes a linear collection of data items

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

Tuple?

A

Collection of elements that is immutable

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

Stack

A

First in last out, first item to enter is the last to leave

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

Examples of stacks

A

Stack of plates
Web browser history
Call logs

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

2 computer based uses for stacks

A

Manage memory location
Store temporary variables created by a function

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

Operations that can be performed on stacks

A

Push
Pop
Peak
Is empty
Is full

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

Describe role of the top pointer in stack

A

Let’s the user know if the stack is full

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

Queue

A

First in first out data structure

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

3 Examples of a queue real life

A

Actual queue at supermarket
On the music app
Printer receiving jobs

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

Operations that can be performed on queue

A

Enqueue
Dequeue
Is empty
is full

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

Describe how a circular Queue works

A

There is a fix number, and it is still static the once it has been dequeued It can be replaced and wraps around in a circle.

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

And advantage of a circular Queue over linear

A

It can keep going around in a circle

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

Linked list

A

An abstract data type similar to queue or stack, a dynamic data structure.

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

Operation performed on a linked list

A

Add
Delete
Next
Previous
Traverse

17
Q

Uses for linked list

A

Doesn’t waste memory
Implement stacks, or queues
Effective in insertion and deletion

18
Q

Graph?

A

Abstract data type that can be used to represent non-linear relationships between objects

19
Q

Node?

A

Basic unit of structure

20
Q

Node degree

A

The number of other nodes it is connected to

21
Q

Loop?

A

An edge that connects a node to itself

22
Q

Path?

A

Sequence of nodes that are connected by edges

23
Q

Cycle ?

A

A closed path starts and ends at the same path

24
Q

Difference between a directed and undirected graph

A

Undirected graph does not show the direction between nodes

25
Q

What is a weighted graph

A

These are values associated with the edges

26
Q

Tree?

A

A connected undirected graph with no cycles

27
Q

Rooted tree?

A

One node has been designated as the root

28
Q

Binary tree

A

Every node has at most two child nodes