Constructing a Binary Search Tree..

Are there easy and efficient method to construct a binary tree without using structures or pointers?

How can we use STL to construct a binary search tree, as suppose we have given an array with n numbers, where n is about 10000, just example, so how can we construct a binary search tree without using pointers or structures to find a number…?

Add the numbers to a STL set object.

1 Like

Thanks for reply…

Actually i do not have any idea about trees!!

So could you please explain and show me an implementation.?

I know the theory and the concept but not the implmentation…

Please Help!!

Thanks for answer… but could you show me an implemented code?

You can see examples in the cplusplus website. E.g. this one for inserting - and find for searching

Thank You @mogers:slight_smile: