Hello and welcome back! Due to the absence of classes the week before last, there was nothing to report. And now, for a specialized announcement:
----------------------------------------------------------------------------------------------------
Dear TA,I choose my summary of object-oriented programming for assessment. It may not be technical; however, I was of the opinion that the concepts were of greater importance.
----------------------------------------------------------------------------------------------------
And now, back to our regular program:So this previous week we came upon recursion in what have been termed 'binary trees.' Rather than create trees of code where the root and its internal nodes have any number of child nodes, these binary trees always have no more than two children per internal node or root. For those who are having trouble visualising such a thing, consider factor trees from your childhood:
The difference between binary trees and factor trees include:
+Binary Trees ["BT's"] contain unique data (no repeats of data)
+BT's do not require factoring--only the structure is the same.
In addition, we learned how to utilize binary search methods (recursively of course) on these binary trees. These search methods, which are dependent upon the organization of the BT data structures (for example, a BT could be organized such that all numbers to the left of each internal node--and the root node--are less than the node in question, and the numbers to the right are larger than that node) allow for data to be searched for supremely faster than if the computer was forced to check every piece of data within the BT. Binary search methods are equivalent to the logarithm function, and I must say, I definitely prefer searching through the log(10-kajillion) than searching through 10-kajillion pieces of data.
Just my personal preference. No pressure.
Just kidding, this shouldn't even be up for debate. 10-kajillion searches when data is already organized in a clearly helpful manner is madness.
Thanks for reading!
No comments:
Post a Comment