A week of Big Oh's, efficiency, and sorting algorithms. And a little bit of BST review, but since I talked about that last week, I'm just going to briefly go over it here. A BST is essentially a tree, but organized. The left subtree will always have values less than that of the root, while the right subtree will have values greater than it. Now on to more important things.
I don't know if this says something about my personality but I love learning about efficiency. Just anything about it, whether it's about why my program being inefficient or about the mathematics of efficiency or just simply how lazy computer scientists are when it comes to accuracy with efficiency. I've always thought that as you go on in CS, you will inevitably start making less and less efficient functions simply because problems will contain more and more unknowns and will be impossible to do efficiently. I was both pleasantly surprised as well as horrified to learn that this was not the case. Factorial and N^N functions are deemed improper in every level of computer science, but occasionally a necessity, depending on the function.
In addition, while learned in more detail in CSC 165, Big Oh notation seems to fit perfectly into the dogma of of a CS student; being lazy and efficient. You always round down to the lowest Big Oh that fits your function, you always remove the coefficient and put it as a breakpoint instead. At first I thought it was silly to purposefully simply a function to its basest form, but as the examples in class get more and more complicated, I could see why this is a huge time saver (you can find out the efficiency of the function at literally once glance), and why it is used today.
No comments:
Post a Comment