SlideShare a Scribd company logo
1 of 1
Download to read offline
Explain what is meant by the height of a binary tree. Let us assume that in a fully populated
binary tree, there are 15 internal (non terminal) vertices. What is the height of the tree? Is there a
relationship between height of a tree and maximum number of nodes?
Solution
The height of a tree is the length of the path from the root to the leave of the tree. A (rooted) tree
with only one node (the root) has a height of zero.
heigh = 0, node = 1, internal vertices = 0
heigh = 1, node = 2, internal vertices = 1
heigh = 2, node = 4, internal vertices = 3
heigh = 3, node = 8, internal vertices = 7
heigh = 4, node = 16, internal vertices = 15
therefore, the height of the tree with 15 internal vertices is 4.
relationship:
max nodes = (2(Height + 1)) - 1

More Related Content

More from akashapparels

dydt = y + sin2tSolution rewrite in standard.pdf
 dydt = y + sin2tSolution                     rewrite in standard.pdf dydt = y + sin2tSolution                     rewrite in standard.pdf
dydt = y + sin2tSolution rewrite in standard.pdfakashapparels
 
Eachibit 14.1 Sources of Income for the Average Retiree Socia Securit.pdf
 Eachibit 14.1 Sources of Income for the Average Retiree Socia Securit.pdf Eachibit 14.1 Sources of Income for the Average Retiree Socia Securit.pdf
Eachibit 14.1 Sources of Income for the Average Retiree Socia Securit.pdfakashapparels
 
Emulsified water is generally present in crude oil as a result of mix.pdf
 Emulsified water is generally present in crude oil as a result of mix.pdf Emulsified water is generally present in crude oil as a result of mix.pdf
Emulsified water is generally present in crude oil as a result of mix.pdfakashapparels
 
e sin t dt Solution uSE integration by parts .pdf
 e sin t dt Solution                     uSE integration by parts .pdf e sin t dt Solution                     uSE integration by parts .pdf
e sin t dt Solution uSE integration by parts .pdfakashapparels
 
dydx=1+yx solve the ODE Solutiondydx - yx = 1dydx + (-1.pdf
 dydx=1+yx solve the ODE Solutiondydx - yx = 1dydx + (-1.pdf dydx=1+yx solve the ODE Solutiondydx - yx = 1dydx + (-1.pdf
dydx=1+yx solve the ODE Solutiondydx - yx = 1dydx + (-1.pdfakashapparels
 
Elizabeth wants to accumulate dollar 12,000 by the end of 5 years. If.pdf
 Elizabeth wants to accumulate dollar 12,000 by the end of 5 years. If.pdf Elizabeth wants to accumulate dollar 12,000 by the end of 5 years. If.pdf
Elizabeth wants to accumulate dollar 12,000 by the end of 5 years. If.pdfakashapparels
 
Economics (Multinational firms. FDI Question 2 Balancing macroeconom.pdf
 Economics (Multinational firms. FDI Question 2 Balancing macroeconom.pdf Economics (Multinational firms. FDI Question 2 Balancing macroeconom.pdf
Economics (Multinational firms. FDI Question 2 Balancing macroeconom.pdfakashapparels
 
During the night shift in an A&E; department (10 pm to 6 am) patients.pdf
 During the night shift in an A&E; department (10 pm to 6 am) patients.pdf During the night shift in an A&E; department (10 pm to 6 am) patients.pdf
During the night shift in an A&E; department (10 pm to 6 am) patients.pdfakashapparels
 
During the night shift in an A&E; department (10 pm to 6am) patients .pdf
 During the night shift in an A&E; department (10 pm to 6am) patients .pdf During the night shift in an A&E; department (10 pm to 6am) patients .pdf
During the night shift in an A&E; department (10 pm to 6am) patients .pdfakashapparels
 
During the month of February, Morrisey Corporations employees earne.pdf
 During the month of February, Morrisey Corporations employees earne.pdf During the month of February, Morrisey Corporations employees earne.pdf
During the month of February, Morrisey Corporations employees earne.pdfakashapparels
 

More from akashapparels (10)

dydt = y + sin2tSolution rewrite in standard.pdf
 dydt = y + sin2tSolution                     rewrite in standard.pdf dydt = y + sin2tSolution                     rewrite in standard.pdf
dydt = y + sin2tSolution rewrite in standard.pdf
 
Eachibit 14.1 Sources of Income for the Average Retiree Socia Securit.pdf
 Eachibit 14.1 Sources of Income for the Average Retiree Socia Securit.pdf Eachibit 14.1 Sources of Income for the Average Retiree Socia Securit.pdf
Eachibit 14.1 Sources of Income for the Average Retiree Socia Securit.pdf
 
Emulsified water is generally present in crude oil as a result of mix.pdf
 Emulsified water is generally present in crude oil as a result of mix.pdf Emulsified water is generally present in crude oil as a result of mix.pdf
Emulsified water is generally present in crude oil as a result of mix.pdf
 
e sin t dt Solution uSE integration by parts .pdf
 e sin t dt Solution                     uSE integration by parts .pdf e sin t dt Solution                     uSE integration by parts .pdf
e sin t dt Solution uSE integration by parts .pdf
 
dydx=1+yx solve the ODE Solutiondydx - yx = 1dydx + (-1.pdf
 dydx=1+yx solve the ODE Solutiondydx - yx = 1dydx + (-1.pdf dydx=1+yx solve the ODE Solutiondydx - yx = 1dydx + (-1.pdf
dydx=1+yx solve the ODE Solutiondydx - yx = 1dydx + (-1.pdf
 
Elizabeth wants to accumulate dollar 12,000 by the end of 5 years. If.pdf
 Elizabeth wants to accumulate dollar 12,000 by the end of 5 years. If.pdf Elizabeth wants to accumulate dollar 12,000 by the end of 5 years. If.pdf
Elizabeth wants to accumulate dollar 12,000 by the end of 5 years. If.pdf
 
Economics (Multinational firms. FDI Question 2 Balancing macroeconom.pdf
 Economics (Multinational firms. FDI Question 2 Balancing macroeconom.pdf Economics (Multinational firms. FDI Question 2 Balancing macroeconom.pdf
Economics (Multinational firms. FDI Question 2 Balancing macroeconom.pdf
 
During the night shift in an A&E; department (10 pm to 6 am) patients.pdf
 During the night shift in an A&E; department (10 pm to 6 am) patients.pdf During the night shift in an A&E; department (10 pm to 6 am) patients.pdf
During the night shift in an A&E; department (10 pm to 6 am) patients.pdf
 
During the night shift in an A&E; department (10 pm to 6am) patients .pdf
 During the night shift in an A&E; department (10 pm to 6am) patients .pdf During the night shift in an A&E; department (10 pm to 6am) patients .pdf
During the night shift in an A&E; department (10 pm to 6am) patients .pdf
 
During the month of February, Morrisey Corporations employees earne.pdf
 During the month of February, Morrisey Corporations employees earne.pdf During the month of February, Morrisey Corporations employees earne.pdf
During the month of February, Morrisey Corporations employees earne.pdf
 

Recently uploaded

An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxMohamed Rizk Khodair
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital ManagementMBA Assignment Experts
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFVivekanand Anglo Vedic Academy
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppCeline George
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxCeline George
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptxPoojaSen20
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptxVishal Singh
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMELOISARIVERA8
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxneillewis46
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi RajagopalEADTU
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17Celine George
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....Ritu480198
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxAdelaideRefugio
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...Gary Wood
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024Borja Sotomayor
 

Recently uploaded (20)

An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptx
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptx
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 

Explain what is meant by the height of a binary tree. Let us assume t.pdf

  • 1. Explain what is meant by the height of a binary tree. Let us assume that in a fully populated binary tree, there are 15 internal (non terminal) vertices. What is the height of the tree? Is there a relationship between height of a tree and maximum number of nodes? Solution The height of a tree is the length of the path from the root to the leave of the tree. A (rooted) tree with only one node (the root) has a height of zero. heigh = 0, node = 1, internal vertices = 0 heigh = 1, node = 2, internal vertices = 1 heigh = 2, node = 4, internal vertices = 3 heigh = 3, node = 8, internal vertices = 7 heigh = 4, node = 16, internal vertices = 15 therefore, the height of the tree with 15 internal vertices is 4. relationship: max nodes = (2(Height + 1)) - 1