Saved Bookmarks
| 1. |
Write a short note on stack. |
|
Answer» A stack is an ordered collection of items in which data items may be inserted and deleted at one end. This end is referred as “top”. The opposite to top is known as “base”. The most recently added item in the stack is removed first. This working principle is sometimes called LIFO (Last In First Out). Newer inserted elements will be near the top and elements that are inserted at the beginning are near the base. The applications of stack:
The operation on stack is
|
|