86.6k views
1 vote
What behavior do elements in a stack follow?

2 Answers

5 votes

Answer:

last in, first out, or LIFO behavior

Step-by-step explanation:

B

User LeCoda
by
3.2k points
5 votes
A stack operates on the LIFO (Last In First Out) principle, which states that the element inserted last is the first element to be removed. Inserting an element into the stack is known as a push operation, and removing an element from the stack is known as a pop operation.
User Michiel Overeem
by
3.3k points