Binary Trees

Jun 29, 2015 at 10:03am
I hope this is a proper to question to ask on this forum. How important is it to learn about Binary Trees?

I am learning how to make a binary tree, delete the tree, traverse the tree, find the depth of tress, and ect... Are these things all really necessary for me to learn? I just read that there are already STL that have all these things written. So I don't have to write them and they are much more efficient and well tested. So why do I have to learn about binary trees?

Jun 29, 2015 at 10:45am
Maybe so you understand how they work?
If you moved to another language without an STL for all these things you could roll your own.
Also you might need a modified version of some function.
Last edited on Jun 29, 2015 at 12:52pm
Jun 29, 2015 at 11:49am
It's useful to know how different containers work so that you can choose the best container for the job, and then use it in a way that is efficient.
Last edited on Jun 29, 2015 at 11:50am
Jun 29, 2015 at 11:58am
Actually STL does not have a tree. Some of its classes are implemented using tree, but you cannot access tree structure directly.
Topic archived. No new replies allowed.