SlideShare a Scribd company logo
1 of 1
Download to read offline
Q2. Design the pseudocode to print a binary tree. At the visit of a node of the tree, it prints the
node based on its (x,y) coordinates where x= the inorder rank of the node and y= depth of the
node in the tree. Your algorithm time complexity must be linear in n, i.e., the tight bound on time
complexity must be O(n), where n is the number of nodes. You must provide the pseudocode only
(no Java code).

More Related Content

More from adyardrpradeep

Q2 Mention whether the following instructions are right or.pdf
Q2  Mention whether the following instructions are right or.pdfQ2  Mention whether the following instructions are right or.pdf
Q2 Mention whether the following instructions are right or.pdfadyardrpradeep
 
Q2 5 marks An educational researcher believes that the me.pdf
Q2 5 marks An educational researcher believes that the me.pdfQ2 5 marks An educational researcher believes that the me.pdf
Q2 5 marks An educational researcher believes that the me.pdfadyardrpradeep
 
Q1 We read many accounts this week of what emerging indepen.pdf
Q1 We read many accounts this week of what emerging indepen.pdfQ1 We read many accounts this week of what emerging indepen.pdf
Q1 We read many accounts this week of what emerging indepen.pdfadyardrpradeep
 
Q1Unaudited information about significant events and uncer.pdf
Q1Unaudited information about significant events and uncer.pdfQ1Unaudited information about significant events and uncer.pdf
Q1Unaudited information about significant events and uncer.pdfadyardrpradeep
 
Q1413 What is the structure in coordinates J25 and J10 .pdf
Q1413 What is the structure in coordinates J25 and J10 .pdfQ1413 What is the structure in coordinates J25 and J10 .pdf
Q1413 What is the structure in coordinates J25 and J10 .pdfadyardrpradeep
 
q10 Euromarket investment and fund raising A USbased mult.pdf
q10 Euromarket investment and fund raising A USbased mult.pdfq10 Euromarket investment and fund raising A USbased mult.pdf
q10 Euromarket investment and fund raising A USbased mult.pdfadyardrpradeep
 
Q10 What is the value of the variable message in the foll.pdf
Q10 What is the value of the variable message in the foll.pdfQ10 What is the value of the variable message in the foll.pdf
Q10 What is the value of the variable message in the foll.pdfadyardrpradeep
 
Q1 Write a python function that gets a list as an input an.pdf
Q1 Write a python function that gets a list as an input an.pdfQ1 Write a python function that gets a list as an input an.pdf
Q1 Write a python function that gets a list as an input an.pdfadyardrpradeep
 
Q10 Calculate return on capital when earnings before interes.pdf
Q10 Calculate return on capital when earnings before interes.pdfQ10 Calculate return on capital when earnings before interes.pdf
Q10 Calculate return on capital when earnings before interes.pdfadyardrpradeep
 
Q1 Write the genotype of an individual who is homozygous re.pdf
Q1 Write the genotype of an individual who is homozygous re.pdfQ1 Write the genotype of an individual who is homozygous re.pdf
Q1 Write the genotype of an individual who is homozygous re.pdfadyardrpradeep
 
Q1 Which of the following statements is true about perfectl.pdf
Q1 Which of the following statements is true about perfectl.pdfQ1 Which of the following statements is true about perfectl.pdf
Q1 Which of the following statements is true about perfectl.pdfadyardrpradeep
 
Q1 Use Breadth First Search to find the path from S to G .pdf
Q1 Use Breadth First Search to find the path from S to G .pdfQ1 Use Breadth First Search to find the path from S to G .pdf
Q1 Use Breadth First Search to find the path from S to G .pdfadyardrpradeep
 
Q Write comprehensive brief notes on each of the following .pdf
Q Write comprehensive brief notes on each of the following .pdfQ Write comprehensive brief notes on each of the following .pdf
Q Write comprehensive brief notes on each of the following .pdfadyardrpradeep
 
Q1 5 marks 10 people are randomly selected to taste two b.pdf
Q1 5 marks 10 people are randomly selected to taste two b.pdfQ1 5 marks 10 people are randomly selected to taste two b.pdf
Q1 5 marks 10 people are randomly selected to taste two b.pdfadyardrpradeep
 
python only plz 1 25 pts Define a function called hellowo.pdf
python only plz 1 25 pts Define a function called hellowo.pdfpython only plz 1 25 pts Define a function called hellowo.pdf
python only plz 1 25 pts Define a function called hellowo.pdfadyardrpradeep
 
Put the steps of the lightdependent reactions of photosynth.pdf
Put the steps of the lightdependent reactions of photosynth.pdfPut the steps of the lightdependent reactions of photosynth.pdf
Put the steps of the lightdependent reactions of photosynth.pdfadyardrpradeep
 
Q1 Match the following Terms with their corresponding Defin.pdf
Q1 Match the following Terms with their corresponding Defin.pdfQ1 Match the following Terms with their corresponding Defin.pdf
Q1 Match the following Terms with their corresponding Defin.pdfadyardrpradeep
 
Q1 Shinsei Bank used the pathbased approach so a What.pdf
Q1 Shinsei Bank used the pathbased approach so a What.pdfQ1 Shinsei Bank used the pathbased approach so a What.pdf
Q1 Shinsei Bank used the pathbased approach so a What.pdfadyardrpradeep
 
python help please not sure why code is not working for the.pdf
python help please not sure why code is not working for the.pdfpython help please not sure why code is not working for the.pdf
python help please not sure why code is not working for the.pdfadyardrpradeep
 
Q1 Describe the study carried out on children in Romanian o.pdf
Q1 Describe the study carried out on children in Romanian o.pdfQ1 Describe the study carried out on children in Romanian o.pdf
Q1 Describe the study carried out on children in Romanian o.pdfadyardrpradeep
 

More from adyardrpradeep (20)

Q2 Mention whether the following instructions are right or.pdf
Q2  Mention whether the following instructions are right or.pdfQ2  Mention whether the following instructions are right or.pdf
Q2 Mention whether the following instructions are right or.pdf
 
Q2 5 marks An educational researcher believes that the me.pdf
Q2 5 marks An educational researcher believes that the me.pdfQ2 5 marks An educational researcher believes that the me.pdf
Q2 5 marks An educational researcher believes that the me.pdf
 
Q1 We read many accounts this week of what emerging indepen.pdf
Q1 We read many accounts this week of what emerging indepen.pdfQ1 We read many accounts this week of what emerging indepen.pdf
Q1 We read many accounts this week of what emerging indepen.pdf
 
Q1Unaudited information about significant events and uncer.pdf
Q1Unaudited information about significant events and uncer.pdfQ1Unaudited information about significant events and uncer.pdf
Q1Unaudited information about significant events and uncer.pdf
 
Q1413 What is the structure in coordinates J25 and J10 .pdf
Q1413 What is the structure in coordinates J25 and J10 .pdfQ1413 What is the structure in coordinates J25 and J10 .pdf
Q1413 What is the structure in coordinates J25 and J10 .pdf
 
q10 Euromarket investment and fund raising A USbased mult.pdf
q10 Euromarket investment and fund raising A USbased mult.pdfq10 Euromarket investment and fund raising A USbased mult.pdf
q10 Euromarket investment and fund raising A USbased mult.pdf
 
Q10 What is the value of the variable message in the foll.pdf
Q10 What is the value of the variable message in the foll.pdfQ10 What is the value of the variable message in the foll.pdf
Q10 What is the value of the variable message in the foll.pdf
 
Q1 Write a python function that gets a list as an input an.pdf
Q1 Write a python function that gets a list as an input an.pdfQ1 Write a python function that gets a list as an input an.pdf
Q1 Write a python function that gets a list as an input an.pdf
 
Q10 Calculate return on capital when earnings before interes.pdf
Q10 Calculate return on capital when earnings before interes.pdfQ10 Calculate return on capital when earnings before interes.pdf
Q10 Calculate return on capital when earnings before interes.pdf
 
Q1 Write the genotype of an individual who is homozygous re.pdf
Q1 Write the genotype of an individual who is homozygous re.pdfQ1 Write the genotype of an individual who is homozygous re.pdf
Q1 Write the genotype of an individual who is homozygous re.pdf
 
Q1 Which of the following statements is true about perfectl.pdf
Q1 Which of the following statements is true about perfectl.pdfQ1 Which of the following statements is true about perfectl.pdf
Q1 Which of the following statements is true about perfectl.pdf
 
Q1 Use Breadth First Search to find the path from S to G .pdf
Q1 Use Breadth First Search to find the path from S to G .pdfQ1 Use Breadth First Search to find the path from S to G .pdf
Q1 Use Breadth First Search to find the path from S to G .pdf
 
Q Write comprehensive brief notes on each of the following .pdf
Q Write comprehensive brief notes on each of the following .pdfQ Write comprehensive brief notes on each of the following .pdf
Q Write comprehensive brief notes on each of the following .pdf
 
Q1 5 marks 10 people are randomly selected to taste two b.pdf
Q1 5 marks 10 people are randomly selected to taste two b.pdfQ1 5 marks 10 people are randomly selected to taste two b.pdf
Q1 5 marks 10 people are randomly selected to taste two b.pdf
 
python only plz 1 25 pts Define a function called hellowo.pdf
python only plz 1 25 pts Define a function called hellowo.pdfpython only plz 1 25 pts Define a function called hellowo.pdf
python only plz 1 25 pts Define a function called hellowo.pdf
 
Put the steps of the lightdependent reactions of photosynth.pdf
Put the steps of the lightdependent reactions of photosynth.pdfPut the steps of the lightdependent reactions of photosynth.pdf
Put the steps of the lightdependent reactions of photosynth.pdf
 
Q1 Match the following Terms with their corresponding Defin.pdf
Q1 Match the following Terms with their corresponding Defin.pdfQ1 Match the following Terms with their corresponding Defin.pdf
Q1 Match the following Terms with their corresponding Defin.pdf
 
Q1 Shinsei Bank used the pathbased approach so a What.pdf
Q1 Shinsei Bank used the pathbased approach so a What.pdfQ1 Shinsei Bank used the pathbased approach so a What.pdf
Q1 Shinsei Bank used the pathbased approach so a What.pdf
 
python help please not sure why code is not working for the.pdf
python help please not sure why code is not working for the.pdfpython help please not sure why code is not working for the.pdf
python help please not sure why code is not working for the.pdf
 
Q1 Describe the study carried out on children in Romanian o.pdf
Q1 Describe the study carried out on children in Romanian o.pdfQ1 Describe the study carried out on children in Romanian o.pdf
Q1 Describe the study carried out on children in Romanian o.pdf
 

Recently uploaded

MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
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
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 

Recently uploaded (20)

MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
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
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
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🔝
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 

Q2 Design the pseudocode to print a binary tree At the vis.pdf

  • 1. Q2. Design the pseudocode to print a binary tree. At the visit of a node of the tree, it prints the node based on its (x,y) coordinates where x= the inorder rank of the node and y= depth of the node in the tree. Your algorithm time complexity must be linear in n, i.e., the tight bound on time complexity must be O(n), where n is the number of nodes. You must provide the pseudocode only (no Java code).