Hello :)

Umm I have a small question :)

Which do you recommend for fast searching BST or AVL tree?

My answer: It might be the BST because it'll be noticed that in the right subtree all the numbers greater than the root will be there

also for the smaller numbers will be left

so we can search it easily by just knowing the number that we want to search for if it is greater than the root or smaller!

WHAT do you think? Is my answer right?

thanks in advance :)

8 Years
Discussion Span
Last Post by Q8iEnG


If you pick your root unwisely, your BST may resemble a linked list.

Also consider
- the cost of constructing the tree in the first place
- the cost of keeping it balanced
- the number of searches performed
- the distribution of search results.

You need the whole program scenario to make an accurate judgement.


Well, I guess I found that the AVL is much more faster than BST because if we use AVL we'll get the smallest tree by obtaining it balanced all the way

so the answer would be AVL tree is more faster in search from BST

thanks my friend :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.