One topic we covered this week were the binary search trees. This is a tree where a number designated as the main root would be placed as the starting point of the tree. Then you can insert additional numbers into the tree, and the code would sort it so that numbers less then the parent would be put into the left sub tree and numbers greater would be put into the right sub tree. I enjoy working with binary search trees, especially when there is a __str__() method where we can print a visual representation of the tree.
The other topic we were briefly introduced to was running time analysis. This is the analysis of how fast or slow your function would run. Depending on how you implement the algorithm in your function, the running time may increase or decrease. It may increase/decrease constantly, logarithmically, linearly, quadratically, exponentially, etc. This is a very interesting topic. Thus far our code would run and return a value immediately but this may not be the case for a larger amount of code. Also, we as students may not care as much about the running time of our programs but it would be very important to programmers of commercial software.
After reading the slogs of my classmates, it seems that most people have a grasp on these concepts.
No comments:
Post a Comment