answersLogoWhite

0


Best Answer

5 real life examples where stack operations are being used:- 1) Processing of procedure call and their termination. 2) Clothes in the tank 3) CD's in case 4) Rice packets in godown 5) Cars in garage

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

1) The real life examples of stacks are:

a. Bangles in a hand

b. Same circumference circular rings in a pole

c. Sacks full of wheat placed one over other:

d. Battery cells in a torch.

e. 1. Recursion

2.To convert decimal number to binary

3.Waiter serving orders one after another

4.Truck loaded with wooden boxes

5.To convert infix expression to post-fix

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Give at least 5 real life examples where you use stack operations with algorithm?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Design an algorithm to show the different operations on a stack?

Design an algorithm to show the different operations on a stack?


Give at least 10 real life examples where you use stack operations?

zoology


What is the importance of stack algorithm in your program?

Stack implementations allow us to easily implement backtracking algorithms.


What are Disadvantage of stack?

A stack is a LIFO (last-in, first-out) data structure such that only the top-most element is accessible and all new elements are pushed onto the top (analogous to a stack of plates). Stacks are advantageous when implementing a back-tracking algorithm but are ultimately useless for anything else. However, this is not a disadvantage. If you're not implementing a back-tracking algorithm then the problem is not the stack itself it is the fact that you are using the wrong type of container for your algorithm.


An algorithm to Reversing the order of elements on stack S using 1 additional stacks?

// stack to contain content Stack sourceStack = new Stack(); // ... fill sourceStack with content // stack to contain reversed content Stack targetStack = new Stack(); while (!sourceStack.empty()) { targetStack.push(sourceStack.pop()); } // targetStack contains the reversed content of sourceStack


What are the stack operation?

there are two operations you can do with a STACK one is PUSH operation and the other is POP operation


Write an algorithm to remove an item from the top of the stack?

It is not possible to write a code to POP from the stack when there is no your stack implementation information.Because of that I am going to talk more about Stack in computer architecture and there will be additional link to specific examples(-e).In x86 architecture there is three registers (BP, SP and SS) which are connected with stack and only SP and SS is needed.SS - Stack Segment (base register);SP - Stack Pointer (offset);This is how the POP instruction works:# operand = [SS:SP] (top of the stack) # SP = SP + 2; (change SP to point to new top element)


What is interface stack?

The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with five operations that allow a vector to be treated as a stack. The usual push and pop operations are provided, as well as a method to peek at the top item on the stack, a method to test for whether the stack is empty, and a method to search the stack for an item and discover how far it is from the top.


What is a stock sorting algorithm?

Stock sorting algorithm is a algorithm which is used to sort any kind of stock i.e. any data type containing the primitive values like array ,link list ,stack etc.


What is stock sorting algorithm?

Stock sorting algorithm is a algorithm which is used to sort any kind of stock i.e. any data type containing the primitive values like array ,link list ,stack etc.


Can you provide a solution to the diamond-square algorithm using Java and recursion?

Yes. It is possible to provide a solution to the diamond-square algorithm using Java and recursion.


What is time complexity of stack?

All major queue operations (push, pop and front) are constant time operations.