I have to implement binary search and search with binary tree.

Suppose I have an array to be searched for value (for example int numbers to avoid complications).Binary search is not a problem. With binary search array must be first sorted,so for example when I

have an array {2 1 4 8 1 5}, I first call some function for sorting. After that I have

{1 1 2 4 5 8}. Then I call binary search that divides array into halfs until find

specific element (if element exists).

But, what is search with binary tree? I suppose first I have to create binary tree from

array members. For example using some function Insert.

After that I have following structure:Code:for(int i=0;i<length_array;i++) Insert(array[i]);

2

1 4

1 8 5

And then I should use some function Find() to find element in the tree.

If this is search with binary tree?

Assumption is that I have to sort unsorted array. This way will work, but I wonder if

this really search with binary tree. Significant amount of time is lost while creating

tree calling Insert(), and after that, calling function Find is necessary.

All advices are welcome

Thanks