Skip to content

Latest commit

 

History

History
 
 

tree_traversal

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Tree Traversal

python traversal.py
 
                1
        2               3
    4      5        6       7  
   8 9   10 11    12 13   14 15
        
--- LEVEL-ORDER iterative ---
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 

--- PRE-ORDER iterative ---
1 2 4 8 9 5 10 11 3 6 12 13 7 14 15 

--- PRE-ORDER recursive ---
1 2 4 8 9 5 10 11 3 6 12 13 7 14 15 

--- IN-ORDER iterative ---
8 4 9 2 10 5 11 1 12 6 13 3 14 7 15 

--- IN-ORDER recursive ---
8 4 9 2 10 5 11 1 12 6 13 3 14 7 15 

--- POST-ORDER recursive ---
8 9 4 10 11 5 2 12 13 6 14 15 7 3 1