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

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

What does the acronym FIFO mean?

A

First In First out

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

What methods are available on a Queue data structure?

A

enqueue()
dequeue()
peek()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

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