i want to write an algo about stack example.. that is, ""When a person wear bangles the last bangle worn is the first one to be removed and the first bangle would be the last to be removed. This follows last in first out (LIFO) principle of stack.""
how to write it?

Recommended Answers

Please use Capital Letters. Also don't ask anyone to do your homework.

If you have any specific question, or errors you do not understand, don't hesitate to ask, I'd love to help you!

Jump to Post

All 2 Replies

Please use Capital Letters. Also don't ask anyone to do your homework.

If you have any specific question, or errors you do not understand, don't hesitate to ask, I'd love to help you!

algorithm:
1. stack arm;
2. if (arm is empty)
push bangles
3. if (arm is full)
pop bangles
this was answer.. iv done it!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.