Binary Traversal Demo

Write a program binary_traversal_demo.py that:

  1. Creates a binary tree and fills it with values
  2. Runs three functions that demonstrate the three strategies for traversing the tree: Calling each of the functions causes them to recursively work through the tree, eventually returning a list of the values that result from traversing the tree in the indicated fashion.

As an example consider this binary tree:

            a
           / \ 
          /   \ 
         /     \ 
        /       \ 
       b         c  
      / \       / \ 
     /   \     /   \ 
    d     e   f     g  
   / \     \       / 
  h   i     j     k 

Calling the preorder() function on this tree would return the result [a, b, d, h, i, e, j, c, f, g, k].