Data Structures Flashcards

1
Q

How would you examine items below the top of a stack?

A

.

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

How would you find out how many items are in a stack?

A

.

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

What happens to the order of values that are moved from one stack to another?

A

they’re flipped

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

How can a stack be returned to its original state after examining its internal values?

A

flip the inverted stack into it

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

How would you examine items after the front of a queue?

A

by removing (temporary) front value and use peek on the next.

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

How would you cycle through items in a queue without permanently removing them?

A

by adding them to another queue

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