Published on February 4, 2014 by mycodeschool

See complete series on data structures here:

In this lesson, we have implemented binary search tree in C/C++. We have written a simple program to create a binary search tree of integers and search an element in it.

See source code here:

Lesson on dynamic memory allocation:

For practice problems and more, visit: www.mycodeschool.com

Like us on Facebook: www.facebook.com/MyCodeSchool

Follow us on twitter: twitter.com/mycodeschool

Leave a Reply

296 Comments on "Binary search tree – Implementation in C/C++"

Notify of
avatar

Prashob Mathiyambath
Guest
Prashob Mathiyambath
13 days 13 hours ago

Thanks a lot kindly amke a video on vector implementation of trees.

spicytuna08
Guest
spicytuna08
14 days 46 minutes ago

if root implies to the very first node, how is it possible that the value of root is kept throughout the program when new value of root is returned from insert() function?

spicytuna08
Guest
spicytuna08
14 days 2 hours ago

why is it that recursion was not intuitive at all to me? tracing stacks is a nightmare.

Usama Iftikhar Butt
Guest
Usama Iftikhar Butt
17 days 15 hours ago

thank u

Usama Iftikhar Butt
Guest
Usama Iftikhar Butt
17 days 15 hours ago

amazing

Natural View 2
Guest
Natural View 2
26 days 8 hours ago

man u r just awesomeeeeeeeeeeeeeee

Rida Amin
Guest
Rida Amin
26 days 14 hours ago

sir please min heap me insert min heap ka code bta de for complete binary method

Edward Deitner
Guest
Edward Deitner
1 month 8 days ago

Unbelievable, I am really bad in English but I understand almost everything what you explain in this language, which is pretty strange for me. It is like Einstein said: If you cant explain it easy enough you do not understand it well enough.And you understand it absolutely, so your explanations get great!

Pavan Kalyan
Guest
Pavan Kalyan
1 month 14 days ago

where can i get the whole logic in c

Abhay Gupta
Guest
Abhay Gupta
1 month 19 days ago

i think condition for avoiding insertion of duplicate element is missing here.

1 2 3 25
wpDiscuz