C Programming and Data Structures: Unit III: b. Linear Data Structures Stacks and Queues

Stack ADT

Definition, Operations, Structure

• Stack is a data structure which posses LIFO i.e. Last In First Out property. • The abstract data type for stack can be as given below.

Stack ADT

• Stack is a data structure which posses LIFO i.e. Last In First Out property.

• The abstract data type for stack can be as given below.

AbstractDataType stack

{

Instances: Stack is a collection of elements in which insertion and deletion of elements is done by one end called top.

Preconditions:

1. Stfull (): This condition indicates whether the stack is full or not. If the stack is full then we cannot insert the elements in the stack.

2. Stempty(): This condition indicates whether the stack is empty or not. If the stack is empty then we cannot pop or remove any element from the stack.

Operations:

1. Push:  By this operation one can push elements onto the stack. Before performing push we must check stfull () condition.

2. Pop: By this operation one can remove the elements from stack. Before popping the elements from stack we should check stempty() condition.

}

C Programming and Data Structures: Unit III: b. Linear Data Structures Stacks and Queues : Tag: : Definition, Operations, Structure - Stack ADT


C Programming and Data Structures: Unit III: b. Linear Data Structures Stacks and Queues



Under Subject


C Programming and Data Structures

CS3353 3rd Semester EEE, ECE Dept | 2021 Regulation | 3rd Semester EEE Dept 2021 Regulation



Related Subjects


Probability and complex function

MA3303 3rd Semester EEE Dept | 2021 Regulation | 3rd Semester EEE Dept 2021 Regulation


Electromagnetic Theory

EE3301 3rd Semester EEE Dept | 2021 Regulation | 3rd Semester EEE Dept 2021 Regulation


Digital Logic Circuits

EE3302 3rd Semester EEE Dept | 2021 Regulation | 3rd Semester EEE Dept 2021 Regulation


Electron Devices and Circuits

EC3301 3rd Semester EEE Dept | 2021 Regulation | 3rd Semester EEE Dept 2021 Regulation


Electrical Machines I

EE3303 EM 1 3rd Semester EEE Dept | 2021 Regulation | 3rd Semester EEE Dept 2021 Regulation


C Programming and Data Structures

CS3353 3rd Semester EEE, ECE Dept | 2021 Regulation | 3rd Semester EEE Dept 2021 Regulation