CST370 - Module 5

What did I learn in the fourth week of CST370? 

This week we went further into algorithm design by learning partition-based sorting, tree processing, decrease-and-conquer strategies, and graph ordering techniques. Basically, this module started off with quick sort, which contrasted to the merge sort, as the merge sort was all about splitting and merging, while quick sort instead partitions the array around a pivot that is then recursively sorted. Furthermore, the algorithm introduced a new strategy called median of three, which showcased how practical implementations reduce worst-case scenarios.

The next major topic was about binary trees traversal order through preorder, in-order, and post-order traversals with different structures. Furthermore, we were required to understand how to calculate the tree height and how the tree depth affects algorithmic efficiency. From there, the module shifted into a decrease-and-conquer design technique, which used the binary search as a central example in demonstrating how a problem size can be reduced by a constant factor. In comparison to divide-and-conquer, decease-and-conquer was more streamlined in its ability to resolve the problem by shrinking the search space given.

Finally, the module closed with the transform-and-conquer through pre-sorting. Basically, the strategy showed how one can sort data first by simplifying later operations, which turned inefficient tasks into manageable ones. In the end, this module was very comprehensive in algorithmic strategies, reinforcing the idea of recognizing patterns and choosing the right strategy depending on the structure of the problem provided. 

Comments

Popular Posts