Tuesday, March 31, 2009

Binary Trees: Not Just in Nature


Computer programming does not only deal with the different programming languages, but it also deals with different data structures. Recently, I was taught about the importance of the tree data structures and how there are so many different kinds of trees. The three different kinds of trees I learned about throughout the past year has been a binary search tree, a heap tree, and a red-black tree. A tree consists of a node, which then goes down and connects to other nodes which are its children, and continues to the last line when the children do not extend to anything else. In a binary tree, the maximum amount of children that a parent noode can have is two, which means that the maximum number of nodes on a level is 2^n. Each type of tree which will be described shortly, has different methods and algorithms to sort, insert, and delete nodes from the tree with different time complexities and their own unique style. For my next post, I will talk about how the trees are different, and which ones appear to be faster.

No comments:

Post a Comment