Data Structures & Algorithms Quiz Questions Flashcards
1
Q
How would you examine items below the top of a stack?
A
By taking the top off
2
Q
What happens to the order of values that are moved from one stack to another?
A
The order becomes reversed
3
Q
How can a stack be returned to it’s original state after examining its internal values?
A
By putting the stack into another stack, then putting it back in place
4
Q
How would you find out how many items are in a stack?
A
By looping through the whole stack and counting