You are on page 1of 1

1. How are the data being managed using a stack?

 a stack is an abstract data type that serves as a collection of elements, with two principal
operations: push, which adds an element to the collection, and. pop, which removes the
most recently added element that was not yet removed.

2. If a data in the middle of the stack will be removed, what happened to the data on top of
it after they are being popped from the stack?
 A stack is a basic data structure that can be logically thought of as a linear structure. The
previous top is then "next" from the item being added and the list's front. When you want
to pop something off the list, simply remove the first item.

You might also like