This is a question that has come to my mind a lot when learning about tree structures. They seemed too weird,useless and pointless to me until I did a simple google. Apparently they are used in 3D video games to determine what objects need to be rendered. Tree structure are also used to organize information in database systems.
These answers still do not satisfy my curiosity but they do make me happy because now I know that I didn't learn something that would be useless or only useful as "learning tools". Theres is actually important uses for these trees!!!
With binary trees it makes things very easy when dealing with big data. Being able to insert, remove or search becomes relatively fast. This way data can be recorded without taking too much space.
One way why this would be useful is when trying to use a quick way to sort data. You would insert data into a binary search tree at O(log(n)). Then traverse the tree in order to sort them. With binary tree's the left child is always less than the root and the right side is greater than the root. This really helps when sorting.
Though I did get the impression that binary tree's are the most useful trees and that other basic tree's are not that practical to use. Tree's that use BSTNodes are (from what I read online) not relevant anymore aside from being used as learning tools.
Sorry that I missed last week's deadline. That is why this week you get you enjoy a double entry :)
No comments:
Post a Comment