Data Structure: Unit II (a): Stacks

Concept of Stacks

Definition, Example Operations | Data Structure

A stack is an ordered list in which all insertions and deletions are made at one end, called the top. If we have to make stack of elements 10, 20, 30, 40, 50, 60 then 10 will be the bottommost element and 60 will be the topmost element in the stack.

UNIT - II

CHAPTER - 2 : STACKS

Concept of Stack

Definition :

A stack is an ordered list in which all insertions and deletions are made at one end, called the top. If we have to make stack of elements 10, 20, 30, 40, 50, 60 then 10 will be the bottommost element and 60 will be the topmost element in the stack. A stack is shown in Fig. 2.1.1.

• Example

The typical example can be a stack of coins. The coins can be arranged one on another, when we add a new coin it is always placed on the previous coin and while removing the coin the recently placed coin can be removed. The example resembles the concept of stack exactly.

Data Structure: Unit II (a): Stacks : Tag: : Definition, Example Operations | Data Structure - Concept of Stacks