Skip to content

QueenieCplusplus/BinaryTree_binaryTree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

BinaryTree_binaryTree

二元樹資料結構及其屬性

this Data Type

left child right siblings

                        root
                      /      
                   chid  __ sibling
                  (left)    (right)

LeftChid | data | RightChild

                        data
                        
                      /      \
                      
                LeftChild   RightChild

tree

                      parent
                     
                        |
                        
                      child

also a tree

                      parent
                      
                      /     \
                   
                   child     child

binary tree

                     parent
                     
                     /
                     
                  child

those properties it has

  level (the bigger the level is, the worse the performance it takes)

  leaf nodes numbers

  degree2 nodes numbers

to observe this data type, we shall determine the max number of nodes in a binary tree of depth k and the relationship between the number of leaf nodes and the number of degree2 nodes in a binary tree.

below graph is a full binary tree of depth 4 with sequential node numbers:

                                1
                                
                     2                      3
                     
              4            5           6           7
         
            8   9     10    11     12    13    14   15

Releases

No releases published

Packages

No packages published

Languages