Skip to content

RuslanPrimak/BinaryTree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BinaryTree

Implementation algorithm for Binary Tree with deleting items and printing Tree

This implemetation includes such operates:

  • adding value
  • checking value for existence
  • deleting value
  • printing out tree structure via pseudo graphic

Example output:

Initial tree
              5              
       β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”      
       2              7      
  β”Œβ”€β”€β”€β”€β”΄β”€β”€β”      β”Œβ”€β”€β”€β”€β”΄β”€β”€β”   
  1       3      6       8   
 β”Œβ”΄β”€β”  β”Œβ”€β”€β”΄β”    β”Œβ”΄β”€β”  β”Œβ”€β”€β”΄β”  
           4              9  
          β”Œβ”΄β”€β”           β”Œβ”΄β”€β”
                             

After deleted item
             5            
       β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”     
       2            8     
  β”Œβ”€β”€β”€β”€β”΄β”€β”€β”      β”Œβ”€β”€β”΄β”€β”€β”  
  1       3      6     9  
 β”Œβ”΄β”€β”  β”Œβ”€β”€β”΄β”    β”Œβ”΄β”€β”  β”Œβ”΄β”€β”
           4              
          β”Œβ”΄β”€β”            
                          

Random tree
                            27                             
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  
         22                            36                  
       β”Œβ”€β”€β”΄β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”                 
      18        26                      41                 
     β”Œβ”€β”΄β”€β”€β”€β”€β”€β”  β”Œβ”΄β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”              
     4                   37                60              
  β”Œβ”€β”€β”΄β”€β”€β”                β”Œβ”΄β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”        
  3    12                         43             82        
 β”Œβ”΄β”€β”  β”Œβ”΄β”€β”                    β”Œβ”€β”€β”€β”΄β”€β”         β”Œβ”€β”€β”΄β”€β”€β”€β”€β”€β”  
                                    52        65       94  
                                   β”Œβ”€β”΄β”€β”€β”   β”Œβ”€β”€β”΄β”€β”€β”    β”Œβ”΄β”€β”
                                  48       63    67        
                                  β”Œβ”΄β”€β”     β”Œβ”΄β”€β”  β”Œβ”΄β”€β”      
     
     

About

Implementation algorithm for Binary Tree with deleting items and printing Tree

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages