Chapter 36 - Stacks INCOMPLETE Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Explain the concept of a stack

A

A stack is a last in, first out data structure (LIFO).

Tip: this is like a Pringles can, the last item (crisp) is at the top and is taken out first.

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

What are the two types of stack data structures?

A

A stack can be implemented as a static or dynamic data structure

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

What can a stack be used for?

A

Stacks are used in calculations

Stacks are used to hold return addresses when subroutines are called

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