Monday, March 24, 2014

Week 10 - Sorting

Last semester, we earned about different types of sorting techniques, but we never actually understood how Python executed these internally. However, understanding different algorithms such as the Quicksort and the Merge Sort will give us a broader understanding of how these algorithms work. An interesting way on how the Quicksort method works is that it requires a helper function in order to partition the input given. The overall algorithm also sorts the input recursively allowing the efficiency of the code to take log(n) steps in most cases.

Week 9 - Complexity

This week had an emphasis on understanding and writing efficient code. The week consisted of writing and comparing different types of algorithms that achieved the same goal, but either had a harder or easier time doing it. Looking at the efficiency of these algorithms mathematically involved us looking at something called a "step". A "step" is something the program can do in a fixed amount of time. The amount of "steps" the program takes is directly related to the length of the input given. Like last semester, looking at the algorithm and determining whether it is a linear, quadratic, cubic, ect. is important to understand the efficiency of the algorithm.

Saturday, March 8, 2014

Week 8 - Binary Search Trees

This week was more of a extension of what we learned on trees. The difference here is that BST's are trees with conditions. Discussed in class, these conditions are used so that we can efficiently search through information quickly.
Some of these methods that include finding a particular element in the BST involve some recursion.
Overall, it was a pretty interesting topic to learn, and it looks like its gonna be very important concept to understand in the coming years.