Friday, 6 March 2015

Binary Trees, Primary use.

Unlike the trees that we have discussed in class before, binary trees takes two inputs and has one output value that is represent as the node. The value of the node of binary trees can be both operators of systems of equations or just simple numbers or outputs of other operator nodes. This makes many systematic problems with binary recursion of conditions much easier to solve.


https://www.eecs.berkeley.edu/~bh/ss-pics/parse0.jpg
Binary trees are just like tree but instead of having any number of children, binary trees only have two
 (left and right)


Another useful function of binary trees is a binary search tree, where the value of the left node is less than the value of the main node and the value of the right node is greater than the main node value. By using binary search methods, searches can now be much faster especially compared to other search methods like linear searches, where you have to look at every value of the set.

No comments:

Post a Comment