Saay

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 21

÷



p  ÷ 

÷ 


 
{   
   
  !!
"

{  
     
 
 #


   $
# "   
     


 #
     $
# "   
 
 

 
   
  
"
{    !!  
 
  
" 
   

    
  % 
%  &    &

 '    '( ! 

{ )  *  
 ++     !  

  
)÷
," ÷ 
-" ) 
." ÷/0 1
2" 1/30 ÷
÷ 
{ 
  


     4
{    
 5    &  % 
   
  


"
{ &  %      6     
&  

    % !   $

&  "
{   
%  6      
&

      
 "
{    &   


   %    



    &   
     5   
"
  
{ Deleting a leaf (node with no children): Deleting a leaf is easy, as
we can simply remove it from the tree.
{ Deleting a node with one child: Remove the node and replace it
with its child.
{ Deleting a node with two childrenè all the node to be deleted V.
Do not delete V. Instead, choose either its in-order successor node
or its in-order predecessor node, . Replace the value of V with
the value of , then delete .
{ ms with all binary trees, a node's in-order successor is the left-most
child of its right subtree, and a node's in-order predecessor is the
right-most child of its left subtree. In either case, this node will
have zero or one children. Delete it according to one of the two
simpler cases above.
{
÷  

{ ÷earching a binary tree for a specific value can be


a recursive or iterative process. This explanation covers a
recursive method.
{ We begin by examining the root node .
{ If the tree is null, the value we are searching for does not exist in
the tree.
{ Otherwise, if the value equals the root, the search is successful. If
the value is less than the root, search the left subtree.
{ If it is greater than the root, search the right subtree. This process
is repeated until the value is found or the indicated subtree is
null. If the searched value is not found before a null subtree is
reached, then the item must not be present in the tree.
÷
÷ ÷
{ In existing system we have the code for binary search
tree.But in the existing system it is very difficult to
understand about the various functions in binary search tree
insertion, searching and deletion as the graphics display is not
used in the existing system. The existing system is not much
user friendly and it is very difficult for a user to work with
it.
  ÷  ÷ ÷
{ In our proposed system we have binary search tree with
searching, insertion and deletion. We are building binary
seaech tree with c++ program by using graphics display.by
using graphics display it is becoming more user frirendly and
its more easy to understand for a user.different colors are
used for searching the numbers for easy to understand.
    ÷÷

{ 
 è
IBM compactable pc with 486 DX processor
IBMB RmM
2mb hard disk space
{ ÷ 
 è
Operating system windows xp
 ÷

÷/

3â7," ÷
7-"3 
7.")7
2"÷/078"9 7

 


V
VO
'::,
(

YE÷ VO


& '( '::-
(

YE÷

3'(

/

/

VO

'::.
(

YE÷
& '( VO

'::2
(

YE÷ 
'::8
÷ '( (

 '(
YE÷

6';(

÷3

 
& '(

 %& 


VO


YE÷
:& 

VO

'& <
(
YE÷


& '(
VO

'& =
(

YE÷


& '(

3& 


!

 
 '(

 

 %& 

VO

'::&
(

YE÷
!

VO

'<& 
(

YE÷

m
m


 '(


VO
'& =
(

YE÷


 '(

!
 &   â


!
÷ & '(

 
%& 

? 
VO


  

YE÷

  


 â

VO
?     


YE÷
     


m
m

?   
VO


? 


YE÷
        
    ! 
  "      


?   
VO
"

? 

YE÷
         
   !   " 
     

?   
VO
"
?  


YE÷


??#m ?? $ 


% m#m 
 #&?
??'  ?m
#m 

$
OUTPUT SC

-.Insert element:
2.Print tree:
3.Delete element:
4.÷earch
5.Exit

Enter ur choice:-

Enter the value to insert:5

You might also like