Linear Lists Flashcards
What is an essential property of linear lists?
That the data structures contained within them are linear in function.
What things can be restricted when it comes to linear lists?
Access to a node
Insertion of a node
Deletion of a node
What are the three linear lists structures of most interest
Stack
Deque
Queue
The stack operation takes what parameters?
The name of the stack you are inserting on.
The name of the node.
stack(A, p)
The unstack operation takes what parameters?
None. The operation is a removal.
What is often instantiated when unstacking? Why?
A variable is usually instantiated so that the data that is returned from the stack is not totally lost after the deletion.
What is the queue mnemonic?
First
In
First
Out
How is a queue restricted?
Deletions usually happen at the front.
Insertions happen at the rear.
Explain how a shopping queue could be useful when understanding how queues work?
People enter from the back and are dealt with at the front.
Name the operations associated with a queue.
Queue
Unqueue
How do you add to a queue? What parameters?
Queue operation.
Name of queue.
Queue(A, the node)
What part of a queue does the Queue operation affect?
The rear of the queue.
Remember first in first out.
What does the unqueue operation do?
Removes the first node at the front of the queue.
What is the unqueue operation similar to?
Unstack.
Removing an element and returning the element (often to a variable)
What is a deque otherwise known by?
Double-ended queue.