Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Search, Insert and Deletion. How those properties work in a Binary Tree? How much I read articles and all nothing worked, still I cannot understand it well. Please help me with this. I want to know it simply. On internet they have explained very complicatedly.

share|improve this question
5  
do you want to know unbalanced binary tree, which is the simple implementation first taught in CS undergrad data structures, or do you want to know some form of balanced binary tree, like AVL, Red Black, etc.? – Kevin Dec 30 '11 at 15:28
1  
Sometimes an algorithm doesn't fit the way your brain works -- I had a bitch of a time with Cosine Coefficient when I first encountered it. One way of dealing with this is to do it manually. Get a bunch of 3x5 index cards and treat them as disk pages. Then follow the algorithm by hand as you write/erase the information. By going through this process you can gain real insight to the inner workings. – Peter Rowell Dec 30 '11 at 17:23
5  
-1: What do you want to know that is not covered by material already online? What have you read? What did you not understand? – kevin cline Dec 30 '11 at 18:07

1 Answer

This is not a bad intro to unbalanced trees, with code samples in c and java:

http://cslibrary.stanford.edu/110/BinaryTrees.html

And this is another reasonably good explanation with code samples in c++ (although they don't provide a remove implementation):

http://www.cprogramming.com/tutorial/lesson18.html

And finally, a very verbose article here (with remove implementation):

http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_bst1.aspx

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.