0% found this document useful (0 votes)
39 views1 page

Abstract Data Type Miller

A stack is a last in, first out (LIFO) abstract data type that can contain elements of any type. It is characterized by two fundamental operations: push, which adds an element to the top of the stack, and pop, which removes and returns the top element. Elements are removed from the stack in the reverse order they were added, so the lower elements have been in the stack the longest.

Uploaded by

Rayb20
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views1 page

Abstract Data Type Miller

A stack is a last in, first out (LIFO) abstract data type that can contain elements of any type. It is characterized by two fundamental operations: push, which adds an element to the top of the stack, and pop, which removes and returns the top element. Elements are removed from the stack in the reverse order they were added, so the lower elements have been in the stack the longest.

Uploaded by

Rayb20
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Abstract Data Type (ADT) - Stack

Stack- In computer science, a stack is a last in, first out (LIFO) abstract


data type and data structure. A stack can have any abstract data type as
an element, but is characterized by only two fundamental
operations: push and pop. A stack is a restricted data structure, because
only a small number of operations are performed on it. The nature of the
pop and push operations also mean that stack elements have a natural
order. Elements are removed from the stack in the reverse order to the
order of their addition: therefore, the lower elements are typically those that
have been in the list the longest.

Push-The push operation adds to the top of the list, hiding any items
already on the stack, or initializing the stack if it is empty.

Pop-The pop operation removes an item from the top of the list, and
returns this value to the caller. A pop either reveals previously concealed
items, or results in an empty list.

You might also like