Explore BrainMass

Explore BrainMass

    Binary tree pre and post order traversals in Java

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Write a Java program that loads 12 random integers with the values between 1 and 100 into a tree. Apart from building the tree
    - List the values that have been inserted.
    - Print the tree out in preorder traversal order and then again in postorder traversal order.
    - Print another line showing how deep the tree has become.

    © BrainMass Inc. brainmass.com October 9, 2019, 10:41 pm ad1c9bdddf

    Solution Summary

    You will need to rename the attached program as BinaryTree.java before you compile and run it.