Hi, is it possible to construct a pre order binary tree?

i know how to do a pre order traversal. but constructing a binary tree using that i am not sure what it mean?

what is the purpose of doing a pre order construction of binary treE??

please advise

Member Avatar for Mouche

I don't believe you can create a "pre-order binary tree." Pre-order is a binary tree traversal technique that can display the binary tree in a certain order. You can also do an in-order or post-order binary tree traversal, which are other ways of being able to display the data. All these traversal methods use a typical binary tree.

If you need to print out the data from a binary tree using the pre-order technique, you can build a normal binary tree and then write a method for pre-order transversal.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.