Suppose that the following elements are added in the specified order to an empty binary search tree: Lisa, Bart, Marge, Homer, Maggie, Flanders, Smithers, Milhouse Write the elements of the tree above in the order they would be seen by a pre-order, in-order, and post-order traversal. Type your solutions with the elements separated by spaces and/or commas, such as: One, Two, Three, Four Sound F/X pre-order in-order post-order

Respuesta :

Answer:

Pre-order: Lisa, Bart, Homer, Flanders, Marge, Maggie, Smithers, Milhouse

In-order: Bart, Flanders, Homer, Lisa, Maggie, Marge, Milhouse, Smithers

Post-order: Flanders, Homer, Bart, Maggie, Milhouse, Smithers, Marge, Lisa

Explanation:

The required orders are mentioned.

ACCESS MORE