English, asked by paruljhariya21, 2 months ago

Explain any two applications of stack which was not disussed in class​

Answers

Answered by royalhappinessforeve
9

Answer:

Here are some applications:

1) A good real-life example of a stack is the pile of dinner plates that you encounter when you eat at the local cafeteria: When you remove a plate from the pile, you take the plate on the top of the pile. But this is exactly the plate that was added ("inserted'') most recently to the pile by the dishwasher. If you want the plate at the bottom of the pile, you must remove all the plates on top of it to reach it.

2) A sadder, example of a stack is the slogan, "last hired, first fired,'' which is typically utilized when a company reduces its work force.

3) Many computer algorithms work best with stacks --- stacks are used for

a)remembering partially completed tasks, and

b)undoing (backtracking from) an action.

4) Arithmetic expression evaluation

5) The Java compiler translates programs into posfix notation

6) The Java Virtual Machine uses a stack

Similar questions
English, 1 month ago