Saturday, 29 March 2014

BST

Binary search trees have always been an interest for me in computer science. From the beginning the topic has clicked with me and I find them to be very iterating data structures. Something new for me was learning how they communicated and mutated into linked lists. Binary search trees are nodes with up to 2 child nodes. where the first node at the top of the tree is the root and the bottom nodes with no children are leafs. Also the node above the current node is called a parent node. The traversing taking places in three ways preorder, postorder, and finally in order. In order is when the left subtree is traversed then the root is placed and right subtree comes last. Pre order the root comes first followed by the right then left subtrees. Finally the post order traversal is when the right then left subtrees are traversed folioed by the root. Traversing is a recursive way to display the tree in a list. Trees are abstract data types that have been used in computer science for many year and also a long time to come.

No comments:

Post a Comment