Stack Flashcards
1
Q
What must you do to access the value at an arbitrary point in a queue (not just the “front”)?
A
Dequeue until you reach desired value
2
Q
What does the acronym FIFO mean?
A
First In First out
3
Q
What methods are available on a Queue data structure?
A
enqueue()
dequeue()
peek()
4
Q
How are linked lists different from an array?
A
Linked lists are sequential access (like a queue), not random access (like an array).
5
Q
How would you access an arbitrary node in a linked list (not just the “head”)?
A
You would have to jump from node to node until you reach it. Through the .next property.