SlideShare a Scribd company logo
1 of 1
Download to read offline
Implement a BST with the following basic components a) Create a BST for a list of data ) [use
insert(value) function] a. ( 4 , 2 , 10 , 5 , 8 , 12 , 11 , 18 , 9 , 15 , 6 , 12 , 7 , 15 ) b) Print the
values in in-order, preorder, and post order c) Check if the BST is balanced BST or not. If not,
transform it a balanced BST d) Write delNode(val) function to delete a node from the BST and
then print the remaining BST content in in-order.

More Related Content

More from asarudheen07

In a digital age where computers are connected via network and data ar.pdf
In a digital age where computers are connected via network and data ar.pdfIn a digital age where computers are connected via network and data ar.pdf
In a digital age where computers are connected via network and data ar.pdf
asarudheen07
 
import java-util--- public class MyLinkedList{ public static void.pdf
import java-util---  public class MyLinkedList{    public static void.pdfimport java-util---  public class MyLinkedList{    public static void.pdf
import java-util--- public class MyLinkedList{ public static void.pdf
asarudheen07
 
import java-util-Random- public class GA { int PopulationSize- int i.pdf
import java-util-Random-   public class GA { int PopulationSize- int i.pdfimport java-util-Random-   public class GA { int PopulationSize- int i.pdf
import java-util-Random- public class GA { int PopulationSize- int i.pdf
asarudheen07
 

More from asarudheen07 (20)

In 2011 the Ministry of the environment reduced the acceptble concentr.pdf
In 2011 the Ministry of the environment reduced the acceptble concentr.pdfIn 2011 the Ministry of the environment reduced the acceptble concentr.pdf
In 2011 the Ministry of the environment reduced the acceptble concentr.pdf
 
In a follow up study- you decide to test whether the prevalence of WNV.pdf
In a follow up study- you decide to test whether the prevalence of WNV.pdfIn a follow up study- you decide to test whether the prevalence of WNV.pdf
In a follow up study- you decide to test whether the prevalence of WNV.pdf
 
In a digital age where computers are connected via network and data ar.pdf
In a digital age where computers are connected via network and data ar.pdfIn a digital age where computers are connected via network and data ar.pdf
In a digital age where computers are connected via network and data ar.pdf
 
In a certain city- the daly consumplion of water (in milions or bters).pdf
In a certain city- the daly consumplion of water (in milions or bters).pdfIn a certain city- the daly consumplion of water (in milions or bters).pdf
In a certain city- the daly consumplion of water (in milions or bters).pdf
 
In a city- 70- of the people prefer Candidate A- Suppose 30 people fro.pdf
In a city- 70- of the people prefer Candidate A- Suppose 30 people fro.pdfIn a city- 70- of the people prefer Candidate A- Suppose 30 people fro.pdf
In a city- 70- of the people prefer Candidate A- Suppose 30 people fro.pdf
 
In a 1-1-5 page document (APA format- 12-point font- double-spaced) an.pdf
In a 1-1-5 page document (APA format- 12-point font- double-spaced) an.pdfIn a 1-1-5 page document (APA format- 12-point font- double-spaced) an.pdf
In a 1-1-5 page document (APA format- 12-point font- double-spaced) an.pdf
 
In a 12-year grassland biodiversity experiment- 168 plots containing 1.pdf
In a 12-year grassland biodiversity experiment- 168 plots containing 1.pdfIn a 12-year grassland biodiversity experiment- 168 plots containing 1.pdf
In a 12-year grassland biodiversity experiment- 168 plots containing 1.pdf
 
In 2022- Lisa and Fred- a married couple- had taxable income of $311-4 (1).pdf
In 2022- Lisa and Fred- a married couple- had taxable income of $311-4 (1).pdfIn 2022- Lisa and Fred- a married couple- had taxable income of $311-4 (1).pdf
In 2022- Lisa and Fred- a married couple- had taxable income of $311-4 (1).pdf
 
In 2022- Juanita is married and files a joint tax return with her husb.pdf
In 2022- Juanita is married and files a joint tax return with her husb.pdfIn 2022- Juanita is married and files a joint tax return with her husb.pdf
In 2022- Juanita is married and files a joint tax return with her husb.pdf
 
In 2021- El Salvador became the first in the world to adopt bitcoin as.pdf
In 2021- El Salvador became the first in the world to adopt bitcoin as.pdfIn 2021- El Salvador became the first in the world to adopt bitcoin as.pdf
In 2021- El Salvador became the first in the world to adopt bitcoin as.pdf
 
In 2018- which of the following is true about medical schools in the U.pdf
In 2018- which of the following is true about medical schools in the U.pdfIn 2018- which of the following is true about medical schools in the U.pdf
In 2018- which of the following is true about medical schools in the U.pdf
 
In 2013- the housing market started picking up- Were people getting th.pdf
In 2013- the housing market started picking up- Were people getting th.pdfIn 2013- the housing market started picking up- Were people getting th.pdf
In 2013- the housing market started picking up- Were people getting th.pdf
 
In 2011 the vitue af the Gop detenar in- In 2012- the watus of tie cos.pdf
In 2011 the vitue af the Gop detenar in- In 2012- the watus of tie cos.pdfIn 2011 the vitue af the Gop detenar in- In 2012- the watus of tie cos.pdf
In 2011 the vitue af the Gop detenar in- In 2012- the watus of tie cos.pdf
 
improved income by changing farm and handiwork production to one domin.pdf
improved income by changing farm and handiwork production to one domin.pdfimproved income by changing farm and handiwork production to one domin.pdf
improved income by changing farm and handiwork production to one domin.pdf
 
import ToolKit-BigRational- import java-util-Scanner- public class Exe.pdf
import ToolKit-BigRational- import java-util-Scanner- public class Exe.pdfimport ToolKit-BigRational- import java-util-Scanner- public class Exe.pdf
import ToolKit-BigRational- import java-util-Scanner- public class Exe.pdf
 
import java-util--- public class MyLinkedList{ public static void.pdf
import java-util---  public class MyLinkedList{    public static void.pdfimport java-util---  public class MyLinkedList{    public static void.pdf
import java-util--- public class MyLinkedList{ public static void.pdf
 
Implementation - In this discussion post- you will research and post t.pdf
Implementation - In this discussion post- you will research and post t.pdfImplementation - In this discussion post- you will research and post t.pdf
Implementation - In this discussion post- you will research and post t.pdf
 
import java-util-Random- public class GA { int PopulationSize- int i.pdf
import java-util-Random-   public class GA { int PopulationSize- int i.pdfimport java-util-Random-   public class GA { int PopulationSize- int i.pdf
import java-util-Random- public class GA { int PopulationSize- int i.pdf
 
Immunohematology The blood bank tech Billy received a call from a newe.pdf
Immunohematology The blood bank tech Billy received a call from a newe.pdfImmunohematology The blood bank tech Billy received a call from a newe.pdf
Immunohematology The blood bank tech Billy received a call from a newe.pdf
 
Imagine you have just gone through a three-way merger of companies- On.pdf
Imagine you have just gone through a three-way merger of companies- On.pdfImagine you have just gone through a three-way merger of companies- On.pdf
Imagine you have just gone through a three-way merger of companies- On.pdf
 

Recently uploaded

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Recently uploaded (20)

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
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
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 

Implement a BST with the following basic components a) Create a BST fo.pdf

  • 1. Implement a BST with the following basic components a) Create a BST for a list of data ) [use insert(value) function] a. ( 4 , 2 , 10 , 5 , 8 , 12 , 11 , 18 , 9 , 15 , 6 , 12 , 7 , 15 ) b) Print the values in in-order, preorder, and post order c) Check if the BST is balanced BST or not. If not, transform it a balanced BST d) Write delNode(val) function to delete a node from the BST and then print the remaining BST content in in-order.