Week 7

 

Weekly Learning Journal: Week 7 Reflection

Technical Focus: Breaking the O mega(n log n) Barrier

This week’s module centered on a pivotal shift in algorithmic strategy: the transition from comparison-based sorting to Non-Comparison Sorting techniques like Counting Sort and Radix Sort.

In previous modules, we established that comparison-based algorithms (like Merge Sort or Quick Sort) are mathematically bounded by a lower limit of \Omega(n \log n)$. However, I learned that by making specific assumptions about the input data—such as the range of integers or the number of digits—we can achieve Linear Time Complexity O(n). While the time efficiency is superior, the trade-off lies in Space Complexity, as these algorithms require auxiliary arrays or "buckets" to track frequencies or digit distributions.

Strategic Transitions: Greedy vs. Dynamic Programming

Furthermore, we began exploring the Greedy Technique through Prim’s Algorithm for finding the Minimum Spanning Tree (MST). Comparing this to Dynamic Programming (DP) concepts like Floyd’s Algorithm or the Coin-Row Problem highlighted a crucial distinction: Greedy algorithms make the locally optimal choice at each step, whereas DP ensures a globally optimal solution by solving and storing results for overlapping subproblems. Understanding when a "Greedy" approach is sufficient versus when the overhead of DP is necessary is a critical skill I am currently refining through our Homework 6 implementation.

Comments

Popular posts from this blog

Week 4

Week 2

Week 1