SlideShare a Scribd company logo
1 of 10
HEAPS
SHEETAL WAGHMARE
M.TECH (Computer Science & Data Processing)
IIT KHARAGPUR
EMAIL-ID: shitu2iitkgp@gmail.com
sheetalw3@gmail.com
Instruction To Use This Presentation
 Dear user I have kept some animated/executable/video
files, so it will be easy for you to understand but that will
not run/play in slideshow
 To see/run that files you have to exit from slideshow then
click on the icon and also install KM Player
 For example: click on the below icons one by one( one is
executable file and other is video) you will be able to see
the animation
SHEETAL WAGHMARE
FROM IIT KHARAGPUR
What is Heap?
Heap is a binary tree which satisfies following two properties
Structure Property :
All the level have maximum number of nodes except possibly the last level.
In last level all nodes occur to the left.
Heap Order Property:
The value in any node N is greater then or equal to the values in both its children.
* A Heap is a complete binary tree and so its height is log2 (n+1)
SHEETAL WAGHMARE
FROM IIT KHARAGPUR
Examples
Heap Not an Heap
SHEETAL WAGHMARE
FROM IIT KHARAGPUR
MAX HEAP
80
30
25
5040
2010
11
8
80>40 80>50
40>25
40>10 50>20
50>30
25>8
25>11
Parent node will always have the data greater than childrens
SHEETAL WAGHMARE
FROM IIT KHARAGPUR
10
65
70
5040
6055
80
75
40>10 50>10
70>40
55>40 60>50
65>50
75>70
80>70
Parent node will always contain the data smaller than childrens
SHEETAL WAGHMARE
FROM IIT KHARAGPUR
13
12
6
11
110 9
13
88
99
81
9591 90
MAX HEAP
MIN HEAP
SHEETAL WAGHMARE
FROM IIT KHARAGPUR
REHEAP DOWN
(Deletion from Heap)
REHEAP UP
(Insertion in heap)
SHEETAL WAGHMARE
FROM IIT KHARAGPUR
SHEETAL WAGHMARE
FROM IIT KHARAGPUR
Construction of Heap Using Array
SHEETAL WAGHMARE FROM IIT KHARAGPUR

More Related Content

Viewers also liked

Omobono Enterprise Relationship Management
Omobono Enterprise Relationship ManagementOmobono Enterprise Relationship Management
Omobono Enterprise Relationship ManagementOmobono
 
Enterprise Process Automation Suite
Enterprise Process Automation SuiteEnterprise Process Automation Suite
Enterprise Process Automation SuiteHelpSystems
 
Sales force automation
Sales force automationSales force automation
Sales force automationdamith87
 
5 ways to improve performance through indexing
5 ways to improve performance through indexing5 ways to improve performance through indexing
5 ways to improve performance through indexingJason Strate
 
An Integrated Framework on Mining Logs Files for Computing System Management
An Integrated Framework on Mining Logs Files for Computing System ManagementAn Integrated Framework on Mining Logs Files for Computing System Management
An Integrated Framework on Mining Logs Files for Computing System Managementfeiwin
 
Introduction to Clustered Indexes and Heaps
Introduction to Clustered Indexes and HeapsIntroduction to Clustered Indexes and Heaps
Introduction to Clustered Indexes and HeapsJason Strate
 
Merging files (Data Structure)
Merging files (Data Structure)Merging files (Data Structure)
Merging files (Data Structure)Tech_MX
 
Concept of computer files for Grade 12 learners
Concept of computer files for Grade 12 learnersConcept of computer files for Grade 12 learners
Concept of computer files for Grade 12 learnerswellingtonoboh
 
File Organization
File OrganizationFile Organization
File OrganizationManyi Man
 
Lec 17 heap data structure
Lec 17 heap data structureLec 17 heap data structure
Lec 17 heap data structureSajid Marwat
 

Viewers also liked (17)

Sfa
SfaSfa
Sfa
 
Omobono Enterprise Relationship Management
Omobono Enterprise Relationship ManagementOmobono Enterprise Relationship Management
Omobono Enterprise Relationship Management
 
Enterprise Process Automation Suite
Enterprise Process Automation SuiteEnterprise Process Automation Suite
Enterprise Process Automation Suite
 
Sales force automation
Sales force automationSales force automation
Sales force automation
 
5 ways to improve performance through indexing
5 ways to improve performance through indexing5 ways to improve performance through indexing
5 ways to improve performance through indexing
 
An Integrated Framework on Mining Logs Files for Computing System Management
An Integrated Framework on Mining Logs Files for Computing System ManagementAn Integrated Framework on Mining Logs Files for Computing System Management
An Integrated Framework on Mining Logs Files for Computing System Management
 
Introduction to Clustered Indexes and Heaps
Introduction to Clustered Indexes and HeapsIntroduction to Clustered Indexes and Heaps
Introduction to Clustered Indexes and Heaps
 
Files Management
Files ManagementFiles Management
Files Management
 
Merging files (Data Structure)
Merging files (Data Structure)Merging files (Data Structure)
Merging files (Data Structure)
 
Concept of computer files for Grade 12 learners
Concept of computer files for Grade 12 learnersConcept of computer files for Grade 12 learners
Concept of computer files for Grade 12 learners
 
File organization
File organizationFile organization
File organization
 
File organisation
File organisationFile organisation
File organisation
 
File structures
File structuresFile structures
File structures
 
File Organization
File OrganizationFile Organization
File Organization
 
Sales Force Automation
Sales Force AutomationSales Force Automation
Sales Force Automation
 
Lec 17 heap data structure
Lec 17 heap data structureLec 17 heap data structure
Lec 17 heap data structure
 
File organization
File organizationFile organization
File organization
 

Similar to Heaps

Thea forsketchup usermanual
Thea forsketchup usermanualThea forsketchup usermanual
Thea forsketchup usermanualSubbareddy Pv
 
Introduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsIntroduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsLuca Galli
 
FGS 2011: Making A Game With Molehill: Zombie Tycoon
FGS 2011: Making A Game With Molehill: Zombie TycoonFGS 2011: Making A Game With Molehill: Zombie Tycoon
FGS 2011: Making A Game With Molehill: Zombie Tycoonmochimedia
 
Y1 gd engine_terminologY
Y1 gd engine_terminologYY1 gd engine_terminologY
Y1 gd engine_terminologYElliotBlack
 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminologyaknatdeahobia
 
Open Source Solutions For Live Visuals
Open Source Solutions For Live VisualsOpen Source Solutions For Live Visuals
Open Source Solutions For Live Visualsnocarrier
 
Engine technology worksheet
Engine technology worksheet Engine technology worksheet
Engine technology worksheet nazaryth98
 
Desenvolva um game para android ou iPhone
Desenvolva um game para android ou iPhoneDesenvolva um game para android ou iPhone
Desenvolva um game para android ou iPhoneTiago Oliveira
 
Engine Terminology 1
Engine Terminology 1Engine Terminology 1
Engine Terminology 1copelandadam
 
Using FireMonkey as a game engine
Using FireMonkey as a game engineUsing FireMonkey as a game engine
Using FireMonkey as a game enginepprem
 
Building iPhone Apps: From Flash Lite to Corona
Building iPhone Apps: From Flash Lite to CoronaBuilding iPhone Apps: From Flash Lite to Corona
Building iPhone Apps: From Flash Lite to CoronaAnscamobile
 
Actionscript 3 - Session 3 Action Script And Flash
Actionscript 3 - Session 3 Action Script And FlashActionscript 3 - Session 3 Action Script And Flash
Actionscript 3 - Session 3 Action Script And FlashOUM SAOKOSAL
 
Embedded Linux Multimedia
Embedded Linux MultimediaEmbedded Linux Multimedia
Embedded Linux MultimediaCaglar Dursun
 
Game Engine terminology
Game Engine terminologyGame Engine terminology
Game Engine terminologySamDuxburyGDS
 

Similar to Heaps (20)

Thea forsketchup usermanual
Thea forsketchup usermanualThea forsketchup usermanual
Thea forsketchup usermanual
 
Introduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsIntroduction to html5 game programming with impact js
Introduction to html5 game programming with impact js
 
FGS 2011: Making A Game With Molehill: Zombie Tycoon
FGS 2011: Making A Game With Molehill: Zombie TycoonFGS 2011: Making A Game With Molehill: Zombie Tycoon
FGS 2011: Making A Game With Molehill: Zombie Tycoon
 
Y1 gd engine_terminologY
Y1 gd engine_terminologYY1 gd engine_terminologY
Y1 gd engine_terminologY
 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminology
 
Open Source Solutions For Live Visuals
Open Source Solutions For Live VisualsOpen Source Solutions For Live Visuals
Open Source Solutions For Live Visuals
 
ADVANCED WORKSHOP IN MATLAB
ADVANCED WORKSHOP IN MATLABADVANCED WORKSHOP IN MATLAB
ADVANCED WORKSHOP IN MATLAB
 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminology
 
Engine technology worksheet
Engine technology worksheet Engine technology worksheet
Engine technology worksheet
 
Desenvolva um game para android ou iPhone
Desenvolva um game para android ou iPhoneDesenvolva um game para android ou iPhone
Desenvolva um game para android ou iPhone
 
Engine Terminology 1
Engine Terminology 1Engine Terminology 1
Engine Terminology 1
 
Using FireMonkey as a game engine
Using FireMonkey as a game engineUsing FireMonkey as a game engine
Using FireMonkey as a game engine
 
Building iPhone Apps: From Flash Lite to Corona
Building iPhone Apps: From Flash Lite to CoronaBuilding iPhone Apps: From Flash Lite to Corona
Building iPhone Apps: From Flash Lite to Corona
 
Actionscript 3 - Session 3 Action Script And Flash
Actionscript 3 - Session 3 Action Script And FlashActionscript 3 - Session 3 Action Script And Flash
Actionscript 3 - Session 3 Action Script And Flash
 
How To Theme Fedora
How To Theme FedoraHow To Theme Fedora
How To Theme Fedora
 
Rfp 3 d logo 1 23-13
Rfp 3 d logo 1 23-13Rfp 3 d logo 1 23-13
Rfp 3 d logo 1 23-13
 
Pcb presentation.pptx
Pcb presentation.pptxPcb presentation.pptx
Pcb presentation.pptx
 
Pcb presentation.pptx
Pcb presentation.pptxPcb presentation.pptx
Pcb presentation.pptx
 
Embedded Linux Multimedia
Embedded Linux MultimediaEmbedded Linux Multimedia
Embedded Linux Multimedia
 
Game Engine terminology
Game Engine terminologyGame Engine terminology
Game Engine terminology
 

Recently uploaded

ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
How to Manage Engineering to Order in Odoo 17
How to Manage Engineering to Order in Odoo 17How to Manage Engineering to Order in Odoo 17
How to Manage Engineering to Order in Odoo 17Celine George
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptxJonalynLegaspi2
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
Production of Monoclonal Antibodies by Hybridoma Technology.pptx
Production of Monoclonal Antibodies by Hybridoma Technology.pptxProduction of Monoclonal Antibodies by Hybridoma Technology.pptx
Production of Monoclonal Antibodies by Hybridoma Technology.pptxAnupkumar Sharma
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
The State of AI in Insights and Research 2024: Results and Findings
The State of AI in Insights and Research 2024: Results and FindingsThe State of AI in Insights and Research 2024: Results and Findings
The State of AI in Insights and Research 2024: Results and FindingsRay Poynter
 

Recently uploaded (20)

ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
How to Manage Engineering to Order in Odoo 17
How to Manage Engineering to Order in Odoo 17How to Manage Engineering to Order in Odoo 17
How to Manage Engineering to Order in Odoo 17
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
Production of Monoclonal Antibodies by Hybridoma Technology.pptx
Production of Monoclonal Antibodies by Hybridoma Technology.pptxProduction of Monoclonal Antibodies by Hybridoma Technology.pptx
Production of Monoclonal Antibodies by Hybridoma Technology.pptx
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
The State of AI in Insights and Research 2024: Results and Findings
The State of AI in Insights and Research 2024: Results and FindingsThe State of AI in Insights and Research 2024: Results and Findings
The State of AI in Insights and Research 2024: Results and Findings
 

Heaps