SlideShare a Scribd company logo
1 of 2
For the following BST, list the keys in the order they are visited by each of the following
traversal methods:
Solution
Please follow the data :
Inorder :
This type of ordering follows : the left subtree, the current node, the right subtree.
Preorder :
The ordering follows : the current node, the left subtree, the right subtree.
Postorder :
The ordering follows : the left subtree, the right subtree, the current node.
So the answer is,
Pre order : 15 5 3 12 10 13 16 20 18 23
In order : 3 5 10 12 13 15 16 18 20 23
Post order : 3 10 13 12 5 18 23 20 16 15
Hope this is helpful.
For the following BST- list the keys in the order they are visited by.docx

More Related Content

More from todd161

FInd the zeros for the following polynomial function and give the mult.docx
FInd the zeros for the following polynomial function and give the mult.docxFInd the zeros for the following polynomial function and give the mult.docx
FInd the zeros for the following polynomial function and give the mult.docxtodd161
 
Find the Thevenin impedance at terminals a-b of the circuit on the rig.docx
Find the Thevenin impedance at terminals a-b of the circuit on the rig.docxFind the Thevenin impedance at terminals a-b of the circuit on the rig.docx
Find the Thevenin impedance at terminals a-b of the circuit on the rig.docxtodd161
 
Find the range and interquartile range and median of the following dat.docx
Find the range and interquartile range and median of the following dat.docxFind the range and interquartile range and median of the following dat.docx
Find the range and interquartile range and median of the following dat.docxtodd161
 
Shen yOu are told to plot log olD versus concentration- what variable.docx
Shen yOu are told to plot log olD versus concentration- what variable.docxShen yOu are told to plot log olD versus concentration- what variable.docx
Shen yOu are told to plot log olD versus concentration- what variable.docxtodd161
 
Should OSs be proprietary so that the manufacturers will be able to ma.docx
Should OSs be proprietary so that the manufacturers will be able to ma.docxShould OSs be proprietary so that the manufacturers will be able to ma.docx
Should OSs be proprietary so that the manufacturers will be able to ma.docxtodd161
 
Social Media in Healthcare What are the strengths of using social medi.docx
Social Media in Healthcare What are the strengths of using social medi.docxSocial Media in Healthcare What are the strengths of using social medi.docx
Social Media in Healthcare What are the strengths of using social medi.docxtodd161
 
Sirius is a binary star- consisting of Sirius A and Sirius B- Sirius B.docx
Sirius is a binary star- consisting of Sirius A and Sirius B- Sirius B.docxSirius is a binary star- consisting of Sirius A and Sirius B- Sirius B.docx
Sirius is a binary star- consisting of Sirius A and Sirius B- Sirius B.docxtodd161
 
Simplify- log 4 1Solution log 4 1 - log 1 - log 4 - 0.docx
Simplify- log 4 1Solution log  4  1 - log 1 - log 4  - 0.docxSimplify- log 4 1Solution log  4  1 - log 1 - log 4  - 0.docx
Simplify- log 4 1Solution log 4 1 - log 1 - log 4 - 0.docxtodd161
 
Several years ago a ring of foreign-based hackers broke into Town Bank.docx
Several years ago a ring of foreign-based hackers broke into Town Bank.docxSeveral years ago a ring of foreign-based hackers broke into Town Bank.docx
Several years ago a ring of foreign-based hackers broke into Town Bank.docxtodd161
 
Set up the chemical equation and balance for each (please write out )-.docx
Set up the chemical equation and balance for each (please write out )-.docxSet up the chemical equation and balance for each (please write out )-.docx
Set up the chemical equation and balance for each (please write out )-.docxtodd161
 
Soil Classification systems provide a common language to express conci.docx
Soil Classification systems provide a common language to express conci.docxSoil Classification systems provide a common language to express conci.docx
Soil Classification systems provide a common language to express conci.docxtodd161
 
Solution Approximate Acid- Base- or Approximate pH (2- 5- 7- 9- orNeut.docx
Solution Approximate Acid- Base- or Approximate pH (2- 5- 7- 9- orNeut.docxSolution Approximate Acid- Base- or Approximate pH (2- 5- 7- 9- orNeut.docx
Solution Approximate Acid- Base- or Approximate pH (2- 5- 7- 9- orNeut.docxtodd161
 
So I attempted drawing the new signal below- It is reflected- shifted.docx
So I attempted drawing the new signal below- It is reflected- shifted.docxSo I attempted drawing the new signal below- It is reflected- shifted.docx
So I attempted drawing the new signal below- It is reflected- shifted.docxtodd161
 
Simplify- log 4 1Solution log 4 1 - log 1 - log 4 - 0 (1).docx
Simplify- log 4 1Solution log  4  1 - log 1 - log 4  - 0 (1).docxSimplify- log 4 1Solution log  4  1 - log 1 - log 4  - 0 (1).docx
Simplify- log 4 1Solution log 4 1 - log 1 - log 4 - 0 (1).docxtodd161
 
Silver is immediately above gold on the periodic table and the two met.docx
Silver is immediately above gold on the periodic table and the two met.docxSilver is immediately above gold on the periodic table and the two met.docx
Silver is immediately above gold on the periodic table and the two met.docxtodd161
 
Shown below is an oxidation half-reaction in acidic solution- Which of.docx
Shown below is an oxidation half-reaction in acidic solution- Which of.docxShown below is an oxidation half-reaction in acidic solution- Which of.docx
Shown below is an oxidation half-reaction in acidic solution- Which of.docxtodd161
 
Show that the subset S - {0-2-4-6-8} of Z10 is a subring- Does S have.docx
Show that the subset S - {0-2-4-6-8} of Z10 is a subring- Does S have.docxShow that the subset S - {0-2-4-6-8} of Z10 is a subring- Does S have.docx
Show that the subset S - {0-2-4-6-8} of Z10 is a subring- Does S have.docxtodd161
 

More from todd161 (17)

FInd the zeros for the following polynomial function and give the mult.docx
FInd the zeros for the following polynomial function and give the mult.docxFInd the zeros for the following polynomial function and give the mult.docx
FInd the zeros for the following polynomial function and give the mult.docx
 
Find the Thevenin impedance at terminals a-b of the circuit on the rig.docx
Find the Thevenin impedance at terminals a-b of the circuit on the rig.docxFind the Thevenin impedance at terminals a-b of the circuit on the rig.docx
Find the Thevenin impedance at terminals a-b of the circuit on the rig.docx
 
Find the range and interquartile range and median of the following dat.docx
Find the range and interquartile range and median of the following dat.docxFind the range and interquartile range and median of the following dat.docx
Find the range and interquartile range and median of the following dat.docx
 
Shen yOu are told to plot log olD versus concentration- what variable.docx
Shen yOu are told to plot log olD versus concentration- what variable.docxShen yOu are told to plot log olD versus concentration- what variable.docx
Shen yOu are told to plot log olD versus concentration- what variable.docx
 
Should OSs be proprietary so that the manufacturers will be able to ma.docx
Should OSs be proprietary so that the manufacturers will be able to ma.docxShould OSs be proprietary so that the manufacturers will be able to ma.docx
Should OSs be proprietary so that the manufacturers will be able to ma.docx
 
Social Media in Healthcare What are the strengths of using social medi.docx
Social Media in Healthcare What are the strengths of using social medi.docxSocial Media in Healthcare What are the strengths of using social medi.docx
Social Media in Healthcare What are the strengths of using social medi.docx
 
Sirius is a binary star- consisting of Sirius A and Sirius B- Sirius B.docx
Sirius is a binary star- consisting of Sirius A and Sirius B- Sirius B.docxSirius is a binary star- consisting of Sirius A and Sirius B- Sirius B.docx
Sirius is a binary star- consisting of Sirius A and Sirius B- Sirius B.docx
 
Simplify- log 4 1Solution log 4 1 - log 1 - log 4 - 0.docx
Simplify- log 4 1Solution log  4  1 - log 1 - log 4  - 0.docxSimplify- log 4 1Solution log  4  1 - log 1 - log 4  - 0.docx
Simplify- log 4 1Solution log 4 1 - log 1 - log 4 - 0.docx
 
Several years ago a ring of foreign-based hackers broke into Town Bank.docx
Several years ago a ring of foreign-based hackers broke into Town Bank.docxSeveral years ago a ring of foreign-based hackers broke into Town Bank.docx
Several years ago a ring of foreign-based hackers broke into Town Bank.docx
 
Set up the chemical equation and balance for each (please write out )-.docx
Set up the chemical equation and balance for each (please write out )-.docxSet up the chemical equation and balance for each (please write out )-.docx
Set up the chemical equation and balance for each (please write out )-.docx
 
Soil Classification systems provide a common language to express conci.docx
Soil Classification systems provide a common language to express conci.docxSoil Classification systems provide a common language to express conci.docx
Soil Classification systems provide a common language to express conci.docx
 
Solution Approximate Acid- Base- or Approximate pH (2- 5- 7- 9- orNeut.docx
Solution Approximate Acid- Base- or Approximate pH (2- 5- 7- 9- orNeut.docxSolution Approximate Acid- Base- or Approximate pH (2- 5- 7- 9- orNeut.docx
Solution Approximate Acid- Base- or Approximate pH (2- 5- 7- 9- orNeut.docx
 
So I attempted drawing the new signal below- It is reflected- shifted.docx
So I attempted drawing the new signal below- It is reflected- shifted.docxSo I attempted drawing the new signal below- It is reflected- shifted.docx
So I attempted drawing the new signal below- It is reflected- shifted.docx
 
Simplify- log 4 1Solution log 4 1 - log 1 - log 4 - 0 (1).docx
Simplify- log 4 1Solution log  4  1 - log 1 - log 4  - 0 (1).docxSimplify- log 4 1Solution log  4  1 - log 1 - log 4  - 0 (1).docx
Simplify- log 4 1Solution log 4 1 - log 1 - log 4 - 0 (1).docx
 
Silver is immediately above gold on the periodic table and the two met.docx
Silver is immediately above gold on the periodic table and the two met.docxSilver is immediately above gold on the periodic table and the two met.docx
Silver is immediately above gold on the periodic table and the two met.docx
 
Shown below is an oxidation half-reaction in acidic solution- Which of.docx
Shown below is an oxidation half-reaction in acidic solution- Which of.docxShown below is an oxidation half-reaction in acidic solution- Which of.docx
Shown below is an oxidation half-reaction in acidic solution- Which of.docx
 
Show that the subset S - {0-2-4-6-8} of Z10 is a subring- Does S have.docx
Show that the subset S - {0-2-4-6-8} of Z10 is a subring- Does S have.docxShow that the subset S - {0-2-4-6-8} of Z10 is a subring- Does S have.docx
Show that the subset S - {0-2-4-6-8} of Z10 is a subring- Does S have.docx
 

Recently uploaded

Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 

Recently uploaded (20)

Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 

For the following BST- list the keys in the order they are visited by.docx

  • 1. For the following BST, list the keys in the order they are visited by each of the following traversal methods: Solution Please follow the data : Inorder : This type of ordering follows : the left subtree, the current node, the right subtree. Preorder : The ordering follows : the current node, the left subtree, the right subtree. Postorder : The ordering follows : the left subtree, the right subtree, the current node. So the answer is, Pre order : 15 5 3 12 10 13 16 20 18 23 In order : 3 5 10 12 13 15 16 18 20 23 Post order : 3 10 13 12 5 18 23 20 16 15 Hope this is helpful.