Linear Lists Flashcards

1
Q

What is an essential property of linear lists?

A

That the data structures contained within them are linear in function.

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

What things can be restricted when it comes to linear lists?

A

Access to a node
Insertion of a node
Deletion of a node

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

What are the three linear lists structures of most interest

A

Stack
Deque
Queue

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

The stack operation takes what parameters?

A

The name of the stack you are inserting on.
The name of the node.
stack(A, p)

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

The unstack operation takes what parameters?

A

None. The operation is a removal.

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

What is often instantiated when unstacking? Why?

A

A variable is usually instantiated so that the data that is returned from the stack is not totally lost after the deletion.

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

What is the queue mnemonic?

A

First
In
First
Out

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

How is a queue restricted?

A

Deletions usually happen at the front.

Insertions happen at the rear.

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

Explain how a shopping queue could be useful when understanding how queues work?

A

People enter from the back and are dealt with at the front.

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

Name the operations associated with a queue.

A

Queue

Unqueue

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

How do you add to a queue? What parameters?

A

Queue operation.
Name of queue.

Queue(A, the node)

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

What part of a queue does the Queue operation affect?

A

The rear of the queue.

Remember first in first out.

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

What does the unqueue operation do?

A

Removes the first node at the front of the queue.

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

What is the unqueue operation similar to?

A

Unstack.

Removing an element and returning the element (often to a variable)

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

What is a deque otherwise known by?

A

Double-ended queue.

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

In a general deck, where do insertions and deletions occur?

A

Both left and right sides.

17
Q

What are the specific properties of an input-restricted deque?

A

Input restricted to one side.

Deletion at both sides.

18
Q

What is specific about an output restricted deque

A

Deletion restricted to one side.

Input can happen anywhere.

19
Q

What are the four operations with a deque?

A

Left insert
Right insert
Left delete
Right delete

20
Q

What are the parameters associated with insertion?

A

type_of_insertion([name of deque], [node])

21
Q

What are the parameters associated with deletion?

A

None. Usually something returned to a variable outside of the deque.