CST 370 - Design and Analysis of Algorithms - Week 5

 


This week in CST-370, I learned more about QuickSort and its importance in algorithm design. QuickSort is a divide and conquer algorithm, which stands out for being efficient and "in place" unlike Merge Sort. I learned how the partitioning step affects its performance, with the best case being a balanced split and the worst case occurring when the partition divides unevenly, such as in already sorted or reverse sorted arrays. Empirical analysis mentions the practical implications of efficient algorithms over brute computational power, which made me prioritize learning effective techniques. Additionally, I learned about binary tree traversals, specifically preorder, inorder, and postorder traversal methods. These techniques consist of visiting each node and I practiced some examples to better understand the order in which nodes are visited.

Also, I was introduced to the "Decrease and Conquer" approach, an algorithm design technique that simplifies a problem by solving smaller instances. The binary search algorithm effectively reduces problem size by half with each step. I also learned about Directed Acyclic Graphs (DAGs) and topological sorting, essential for solving dependency based problems. The DFS-based algorithm and Kahn’s algorithm for topological sorting were particularly interesting, as they offered different ways to approach ordering in DAGs. Through examples and practice, I realized the importance of understanding the structure of data and applying the appropriate algorithm to achieve efficient solutions. This week's lessons helped my problem solving skills and gave me a better understanding of how many algorithms work in different scenarios.

Comments

Popular posts from this blog

CST 334 - Operating Systems - Week 6

CST 363 - Introduction to Database - Week 3

CST 311 - Intro to Computer Networks - Week 1