Recommended
CS8391-Data Structures Unit 2
Stack and its applications
Stack operation algorithms with example
6 - STACKS in Data Structure and Algorithm.pptx
Stack data structures with definition and code
Abscddnddmdkwkkstack implementation.pptx
introduction of the Stacks and Queues.pptx
DSA_Unit3_ Stacks and Queues using array (1).pptx
Lec 4 Stack of Data Structures & Algorithms
MO 2020 DS Stacks 1 AB.ppt
STACK is a linear data structure it follows lifo approach
Stack and Queue.pptx university exam preparation
Project of data structure
Data structure by Digvijay
Stacks Data structure.pptx
Fourier-Series SAMPLE PRESENTATION FOR LEARNING
311introductiontomachinelearning.ppt12345
More Related Content
CS8391-Data Structures Unit 2
Stack and its applications
Stack operation algorithms with example
6 - STACKS in Data Structure and Algorithm.pptx
Stack data structures with definition and code
Similar to Stack-data-structure.ppsxErwewwwrrterewewew (20)
Abscddnddmdkwkkstack implementation.pptx
introduction of the Stacks and Queues.pptx
DSA_Unit3_ Stacks and Queues using array (1).pptx
Lec 4 Stack of Data Structures & Algorithms
MO 2020 DS Stacks 1 AB.ppt
STACK is a linear data structure it follows lifo approach
Stack and Queue.pptx university exam preparation
Project of data structure
Data structure by Digvijay
Stacks Data structure.pptx
More from RamaKrishnaErroju (18) Fourier-Series SAMPLE PRESENTATION FOR LEARNING
311introductiontomachinelearning.ppt12345
Day17.pptx department of computer science and eng
Day15.pptx school of computer science and ai
Day3 datamining recent trends and advancements
Day2 Applications of datamining using differe
Introduction about Applications of data mining
Googlecolab1 tutorial for data science practise
Data Preprocessing techniques for applications
TEXMAKER Overview research plagrism check
BioIn_Pap1dramaprevenbtionsakcnnshejjsja
PLSQL_cur.pptx presentation uploadtttees
Recently uploaded (20) O7-L3 Supply Chain Operations - ICLT Program
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
master seminar digital applications in india
Pharma ospi slides which help in ospi learning
GDM (1) (1).pptx small presentation for students
Microbial disease of the cardiovascular and lymphatic systems
Basic Mud Logging Guide for educational purpose
Complications of Minimal Access Surgery at WLH
Supply Chain Operations Speaking Notes -ICLT Program
STATICS OF THE RIGID BODIES Hibbelers.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Module 4: Burden of Disease Tutorial Slides S2 2025
102 student loan defaulters named and shamed – Is someone you know on the list?
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Stack-data-structure.ppsxErwewwwrrterewewew2. What is a STACK ?
A stack is a container of elements that are inserted
and
removed according to the last-in first-out (LIFO)
principle.
A stack is a ordered list of elements of same data
type
A stack is a Linear list
3. What is a STACK ?
0 1 2 3 4
In a stack all operation like
insertion and deletion are
performed at only one end
called Top
4. What is a STACK ?
In a stack all operation like
insertion and deletion are
performed at only one end
called Top
1
2
3
4
0
Insertion Deletion
Top
6. Operations on STACK ?
Insertion
Deletion
Displaying
Creation #define SIZE 5
int stack[SIZE];
1
2
3
4
0
stack
7. Operations on STACK ?
Insertion
Deletion
Displaying
Creation
void push(element){
if(Stack is full)
{
printf(“FULL!!!”);
}
else
{
Top++;
stack[Top] = element;
}
}
1
2
3
4
0
stack
Insertion operation is called as “push”
8. Operations on STACK ?
Insertion
Deletion
Displaying
Creation
int pop( ){
if(Stack is Empty)
{
printf(“EMPTY!!!”);
return Top;
}
else
{
deleted = stack[Top];
Top--;
return deleted;
}
}
1
2
3
4
0
stack
Deletion operation is called as “pop”
9. Operations on STACK ?
Insertion
Deletion
Displaying
Creation
void display( ){
if(Stack is Empty)
{
printf(“EMPTY!!!”);
}
else
{
for(i=Top; i>-1; i--)
printf(“%dn”,stack[i]);
}
}
1
2
3
4
0
stack